From cf03ae1c6591ca898c3db13566e545acbf042614 Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Wed, 13 Jun 2012 17:02:00 -0500 Subject: [PATCH] fixed issue 843, thanks hoatre2001 --- VERSION | 2 +- gluon/dal.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 2a246ca6..c645e82d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-06-13 16:50:48) dev +Version 2.00.0 (2012-06-13 17:01:54) dev diff --git a/gluon/dal.py b/gluon/dal.py index aa9aa75b..6e2f7b71 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -4610,7 +4610,10 @@ class MongoDBAdapter(NoSQLAdapter): return expression def _select(self,query,fields,attributes): - from pymongo.son import SON + try: + from bson.son import SON + except ImportError: + from pymongo.son import SON for key in set(attributes.keys())-set(('limitby','orderby')): raise SyntaxError, 'invalid select attribute: %s' % key