X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fdjango-ldapdb.git;a=blobdiff_plain;f=ldapdb%2Fmodels%2Fquery.py;h=ab5f19ec727b574cc845d44995d1b4371611ead7;hp=0b5e8baea1460e4acd0056673c4fd21a7926002f;hb=d148d9497b40bbfe0a1056e73e72415281f9ef9f;hpb=1fa2f4f13848de14fcf16040fe9769fddafa229b diff --git a/ldapdb/models/query.py b/ldapdb/models/query.py index 0b5e8ba..ab5f19e 100644 --- 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 has_results(self, using): + return self.get_count() != 0 + def results_iter(self): "For django 1.1 compatibility" return self.get_compiler().results_iter()