projects
/
matthijs
/
upstream
/
django-ldapdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
delay LDAP connection establishment
[matthijs/upstream/django-ldapdb.git]
/
ldapdb
/
models
/
query.py
diff --git
a/ldapdb/models/query.py
b/ldapdb/models/query.py
index f5c402040f8826ce05a38d5947c30998bbc9591e..069c237916f515b8b51bd4c909b5a054bf8cf532 100644
(file)
--- a/
ldapdb/models/query.py
+++ b/
ldapdb/models/query.py
@@
-75,11
+75,11
@@
class WhereNode(BaseWhereNode):
obj = Constraint(obj.alias, obj.col, obj.field)
super(WhereNode, self).add((obj, lookup_type, value), connector)
obj = Constraint(obj.alias, obj.col, obj.field)
super(WhereNode, self).add((obj, lookup_type, value), connector)
- def as_sql(self, qn=None):
+ def as_sql(self, qn=None
, connection=None
):
bits = []
for item in self.children:
bits = []
for item in self.children:
- if
isinstance(item, WhereNode
):
- sql, params = item.as_sql()
+ if
hasattr(item, 'as_sql'
):
+ sql, params = item.as_sql(
qn=qn, connection=connection
)
bits.append(sql)
continue
bits.append(sql)
continue