Elrond points out that we should use form.collection.data
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 4 Mar 2013 17:45:14 +0000 (11:45 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 4 Mar 2013 17:45:14 +0000 (11:45 -0600)
That's true; I'm not sure what it's fixing, but he thinks it's fixing
something.  Anyway, it's correct :)

This commit sponsored by Philippe Gauthier.  Thanks!

mediagoblin/user_pages/views.py

index 80919d4712a871cc73b56c1a0105ae370d744461..dc562084a3eb6c7a881c2087b8e86384c4c77e8c 100644 (file)
@@ -227,7 +227,7 @@ def media_collect(request, media):
     # Otherwise, use the collection selected from the drop-down
     else:
         collection = Collection.query.filter_by(
-            id=request.form.get('collection'),
+            id=form.collection.data,
             creator=request.user.id).first()
 
     # Make sure the user actually selected a collection