From 5eacefb581c2c25d62823a67ef0a72f3b5c725df Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 4 Aug 2013 12:53:17 -0500 Subject: [PATCH] issue 1612:mongodb adapter does raw blob data, thanks Alan --- VERSION | 2 +- gluon/dal.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ca9652d7..92345b21 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/gluon/dal.py b/gluon/dal.py index e1ecc2f6..0739f582 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -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'):