diff --git a/VERSION b/VERSION index 2654ffc3..368932f6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.08.06.06.56.19 +Version 2.6.0-development+timestamp.2013.08.06.08.57.19 diff --git a/gluon/dal.py b/gluon/dal.py index 20ec8c2d..786d887c 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -5346,10 +5346,12 @@ class MongoDBAdapter(NoSQLAdapter): d = datetime.date(2000, 1, 1) # mongodb doesn't has a time object and so it must datetime, # string or integer - return datetime.datetime.combine(d, value) + return datetime.datetime.combine(d, value) elif fieldtype == "blob": from bson import Binary - return Binary(value) + if not isinstance(value, Binary): + return Binary(value) + return value elif (isinstance(fieldtype, basestring) and fieldtype.startswith('list:')): if fieldtype.startswith('list:reference'):