From fe99631d8dd4e512b9a9118726b567c6d4cb2666 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20K=C3=B6gl?= Date: Sat, 28 Sep 2013 17:52:45 +0200 Subject: [PATCH] fix wrap doc when reloading from DB --- mygpo/decorators.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mygpo/decorators.py b/mygpo/decorators.py index 93ff5811..4dbe5467 100644 --- a/mygpo/decorators.py +++ b/mygpo/decorators.py @@ -102,7 +102,8 @@ class repeat_on_conflict(object): def default_reload(self, obj): # if the object knows its DB, use this one if obj._db: - return obj._db.get(obj._id) + doc = obj._db.get(obj._id) + return obj.__class__.wrap(doc) # otherwise the class' default DB is used return obj.__class__.get(obj._id) -- 2.11.4.GIT