issue 1612:mongodb adapter does raw blob data, thanks Alan

This commit is contained in:
mdipierro
2013-08-04 12:53:17 -05:00
parent 2c622a7f62
commit 5eacefb581
2 changed files with 4 additions and 1 deletions

View File

@@ -1 +1 @@
Version 2.6.0-development+timestamp.2013.08.01.08.22.32
Version 2.6.0-development+timestamp.2013.08.04.12.52.14

View File

@@ -5347,6 +5347,9 @@ class MongoDBAdapter(NoSQLAdapter):
# mongodb doesn't has a time object and so it must datetime,
# string or integer
return datetime.datetime.combine(d, value)
elif fieldtype == "blob":
from bson import Binary
return Binary(value)
elif (isinstance(fieldtype, basestring) and
fieldtype.startswith('list:')):
if fieldtype.startswith('list:reference'):