minor improvement so that query is not modified

This commit is contained in:
Massimo Di Pierro
2011-12-04 17:51:39 -06:00
parent d92dec8451
commit add7055e00
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.3 (2011-12-04 17:45:21) dev
Version 1.99.3 (2011-12-04 17:51:36) dev
+5 -4
View File
@@ -5829,13 +5829,14 @@ class Set(object):
subset = set(db.users.id<5)
"""
def __init__(self, db, query, ignore_common_filters = False):
def __init__(self, db, query, ignore_common_filters = None):
self.db = db
self._db = db # for backward compatibility
self.query = query
if query:
### Some care here we shuld copy query but we are not for speed!
if query and not ignore_common_filters is None and \
query.ignore_common_filters != ignore_common_filters:
query = copy.copy(query)
query.ignore_common_filters = ignore_common_filters
self.query = query
def __call__(self, query, ignore_common_filters=False):
if isinstance(query,Table):