X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fdjango-ldapdb.git;a=blobdiff_plain;f=ldapdb%2Fmodels%2Fquery.py;h=5b7e6afdd40ff7d49aee800d30a59bbd75aeabe7;hp=bbb46e2553f991e124bbcbc16d1ee3bed0d71beb;hb=a215a2ba69e247e614fa4cffda46ced4e51706bb;hpb=82901736cde9aae9fbe8b6acc0aad2141ecd9583 diff --git a/ldapdb/models/query.py b/ldapdb/models/query.py index bbb46e2..5b7e6af 100644 --- a/ldapdb/models/query.py +++ b/ldapdb/models/query.py @@ -187,14 +187,14 @@ class Query(BaseQuery): super(Query, self).__init__(*args, **kwargs) self.connection = ldapdb.connection - def get_count(self): + def get_count(self, using=None): filterstr = ''.join(['(objectClass=%s)' % cls for cls in self.model.object_classes]) sql, params = self.where.as_sql() filterstr += sql filterstr = '(&%s)' % filterstr try: - vals = self.connection.search_s( + vals = ldapdb.connection.search_s( self.model.base_dn, ldap.SCOPE_SUBTREE, filterstr=filterstr,