From 3618a9ac5112c657fd095a0f9cbd346921a4e800 Mon Sep 17 00:00:00 2001 From: Elrond Date: Mon, 14 Nov 2011 17:11:37 +0100 Subject: [PATCH] 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() --- mediagoblin/submit/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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])) -- 2.25.1