Addressed ticket number 630 by removing MediaEntry.collected

This commit is contained in:
Josie
2013-11-18 20:05:15 -05:00
parent a442823bc1
commit 7dfcc538d3
4 changed files with 17 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
# GNU MediaGoblin -- federated, autonomous media hosting
# GNU MediaGobli:n -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
@@ -72,7 +72,7 @@ def add_media_to_collection(collection, media, note=None, commit=True):
collection.items = collection.items + 1
Session.add(collection)
media.collected = media.collected + 1
Session.add(media)
if commit:

View File

@@ -389,7 +389,6 @@ def collection_item_confirm_remove(request, collection_item):
if form.confirm.data is True:
entry = collection_item.get_media_entry
entry.collected = entry.collected - 1
entry.save()
collection_item.delete()
@@ -436,7 +435,6 @@ def collection_confirm_delete(request, collection):
# Delete all the associated collection items
for item in collection.get_collection_items():
entry = item.get_media_entry
entry.collected = entry.collected - 1
entry.save()
item.delete()