Reference collection creator through already-existing collection_item's foreign key
authorAaron Williamson <aaron@copiesofcopies.org>
Thu, 30 Aug 2012 21:42:04 +0000 (17:42 -0400)
committerJoar Wandborg <git@wandborg.com>
Tue, 18 Sep 2012 16:10:36 +0000 (18:10 +0200)
mediagoblin/user_pages/views.py

index ee366c105f5595980fc5f7a730c7aafd95065ecc..187bba96393a7aec75a077150f56af2795909347 100644 (file)
@@ -376,7 +376,7 @@ def collection_item_confirm_remove(request, collection_item):
                         collection=collection.slug)
 
     if ((request.user.is_admin and
-         request.user._id != collection.creator)):
+         request.user._id != collection_item.in_collection.creator)):
         messages.add_message(
             request, messages.WARNING,
             _("You are about to delete an item from another user's collection. "