From ff7ef47cc7e3af911ab2f1465833d655851f1b69 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 16 Nov 2013 03:16:57 -0600 Subject: [PATCH] fix issue 1777:MongoDB: upload representation error, thanks Francisco Betancourt --- VERSION | 2 +- gluon/dal.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f2cb0069..d61072d9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.7.4-stable+timestamp.2013.11.14.13.28.53 +Version 2.7.4-stable+timestamp.2013.11.16.03.15.58 diff --git a/gluon/dal.py b/gluon/dal.py index 6005634b..48970c36 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -5592,6 +5592,8 @@ class MongoDBAdapter(NoSQLAdapter): # string or integer return datetime.datetime.combine(d, value) elif fieldtype == "blob": + if value== None: + return value from bson import Binary if not isinstance(value, Binary): if not isinstance(value, basestring):