From a90028441a582ebeda7b607f5f04b2c78ac17020 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 20 Aug 2012 08:06:28 -0500 Subject: [PATCH] fixed mongo issue, thanks Uolter --- VERSION | 2 +- gluon/dal.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 4d89648c..be67f037 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-08-19 18:36:14) dev +Version 2.00.0 (2012-08-20 08:06:23) dev diff --git a/gluon/dal.py b/gluon/dal.py index bbe999ea..a1fdfa87 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -4880,6 +4880,10 @@ class MongoDBAdapter(NoSQLAdapter): # need to define all the 'sql' methods gt,lt etc.... def select(self,query,fields,attributes,count=False,snapshot=False): + try: + from pymongo.objectid import ObjectId + except ImportError: + from bson.objectid import ObjectId tablename, mongoqry_dict, mongofields_dict, \ mongosort_list, limitby_limit, limitby_skip = \ self._select(query,fields,attributes)