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
better fix for unicity checks : implement query.has_results()
[matthijs/upstream/django-ldapdb.git]
/
ldapdb
/
models
/
query.py
diff --git
a/ldapdb/models/query.py
b/ldapdb/models/query.py
index 0b5e8baea1460e4acd0056673c4fd21a7926002f..ab5f19ec727b574cc845d44995d1b4371611ead7 100644
(file)
--- a/
ldapdb/models/query.py
+++ b/
ldapdb/models/query.py
@@
-238,6
+238,9
@@
class Query(BaseQuery):
def get_compiler(self, using=None, connection=None):
return Compiler(self, ldapdb.connection, using)
def get_compiler(self, using=None, connection=None):
return Compiler(self, ldapdb.connection, using)
+ def has_results(self, using):
+ return self.get_count() != 0
+
def results_iter(self):
"For django 1.1 compatibility"
return self.get_compiler().results_iter()
def results_iter(self):
"For django 1.1 compatibility"
return self.get_compiler().results_iter()