aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/submit/views.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2011-11-14 17:11:37 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2011-11-15 11:32:13 +0100
commit3618a9ac5112c657fd095a0f9cbd346921a4e800 (patch)
tree4f1ae2b8f286ce9806a2e2c7855e6f3d76d59710 /mediagoblin/submit/views.py
parenteabe6b678a98fd06d9cd8463935a3b842f41485c (diff)
downloadmediagoblin-3618a9ac5112c657fd095a0f9cbd346921a4e800.tar.lz
mediagoblin-3618a9ac5112c657fd095a0f9cbd346921a4e800.tar.xz
mediagoblin-3618a9ac5112c657fd095a0f9cbd346921a4e800.zip
Dot-Notation: x._id = ObjectId() doesn't seem to work properly
For whatever reason, this does not work as expected: entry._id = ObjectId() Need to go this way: entry['_id'] = ObjectId()
Diffstat (limited to 'mediagoblin/submit/views.py')
-rw-r--r--mediagoblin/submit/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/submit/views.py b/mediagoblin/submit/views.py
index bd63bd18..139b1d1d 100644
--- a/mediagoblin/submit/views.py
+++ b/mediagoblin/submit/views.py
@@ -52,7 +52,7 @@ def submit_start(request):
# create entry and save in database
entry = request.db.MediaEntry()
- entry._id = ObjectId()
+ entry['_id'] = ObjectId()
entry['title'] = (
unicode(request.POST['title'])
or unicode(splitext(filename)[0]))