From: Stéphane Péchard Date: Tue, 23 Sep 2014 14:11:39 +0000 (+0200) Subject: Add creator to filter collections X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e119aed22900b682c7dd2cce979f694282f5dbe5;p=mediagoblin.git Add creator to filter collections --- diff --git a/mediagoblin/submit/lib.py b/mediagoblin/submit/lib.py index b23bdf69..d54591d6 100644 --- a/mediagoblin/submit/lib.py +++ b/mediagoblin/submit/lib.py @@ -195,8 +195,9 @@ def submit_media(mg_app, user, submitted_file, filename, # add to collection if collection_slug: - collection = Collection.query.filter_by(slug=collection_slug).first() - add_media_to_collection(collection, entry) + collection = Collection.query.filter_by(slug=collection_slug, creator=user.id).first() + if collection: + add_media_to_collection(collection, entry) # Pass off to processing #