aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mediagoblin/user_pages/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py
index dc562084..c611daa1 100644
--- a/mediagoblin/user_pages/views.py
+++ b/mediagoblin/user_pages/views.py
@@ -226,9 +226,9 @@ def media_collect(request, media):
# Otherwise, use the collection selected from the drop-down
else:
- collection = Collection.query.filter_by(
- id=form.collection.data,
- creator=request.user.id).first()
+ collection = form.collection.data
+ if collection and collection.creator != request.user.id:
+ collection = None
# Make sure the user actually selected a collection
if not collection: