From: Elrond Date: Mon, 14 Nov 2011 16:11:37 +0000 (+0100) Subject: Dot-Notation: x._id = ObjectId() doesn't seem to work properly X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3618a9ac5112c657fd095a0f9cbd346921a4e800;p=mediagoblin.git 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() --- 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]))