From: Daniel Krol Date: Mon, 9 Nov 2015 08:11:36 +0000 (-0800) Subject: Fix add collection view for new schema X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=17eb7786b68c528085fb93f0d6bfd289153e485e;p=mediagoblin.git Fix add collection view for new schema --- diff --git a/mediagoblin/submit/views.py b/mediagoblin/submit/views.py index ccdd70bc..eae4a1e7 100644 --- a/mediagoblin/submit/views.py +++ b/mediagoblin/submit/views.py @@ -112,12 +112,14 @@ def add_collection(request, media=None): collection.title = six.text_type(submit_form.title.data) collection.description = six.text_type(submit_form.description.data) - collection.creator = request.user.id + collection.actor = request.user.id + collection.type = request.db.Collection.USER_DEFINED_TYPE collection.generate_slug() # Make sure this user isn't duplicating an existing collection existing_collection = request.db.Collection.query.filter_by( - creator=request.user.id, + actor=request.user.id, + type=request.db.Collection.USER_DEFINED_TYPE, title=collection.title).first() if existing_collection: