fixed issue 1612, thanks gi0baro

This commit is contained in:
mdipierro
2013-08-06 08:58:21 -05:00
parent 7d0bda7e87
commit a7828d7904
2 changed files with 5 additions and 3 deletions

View File

@@ -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

View File

@@ -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'):