Fix description submission in form handling
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Sun, 8 May 2011 22:23:12 +0000 (00:23 +0200)
committerSebastian Spaeth <Sebastian@SSpaeth.de>
Sun, 8 May 2011 22:23:12 +0000 (00:23 +0200)
When we submitted an image the description would remain empty. THis was
because of some weird typo in form handling. Get an attribute with
.get('description') and not with .get(['description']). With this patch,
descriptions actually go into the database.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
mediagoblin/submit/views.py

index 9c4eb3a406b1fc13ea665024527dbc5766118453..5e262f12aac2090013f1f91423a0c6c5c8906def 100644 (file)
@@ -42,7 +42,7 @@ def submit_start(request):
             # create entry and save in database
             entry = request.db.MediaEntry()
             entry['title'] = request.POST['title']
-            entry['description'] = request.POST.get(['description'])
+            entry['description'] = request.POST.get('description')
             entry['media_type'] = u'image' # heh
             entry['uploader'] = request.user