From: jlaine Date: Mon, 24 May 2010 18:15:01 +0000 (+0000) Subject: use all object classes when performing search X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=f6a7be3e0e92faae7d60e807d584c9560c988ae7;p=matthijs%2Fupstream%2Fdjango-ldapdb.git use all object classes when performing search git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@876 e071eeec-0327-468d-9b6a-08194a12b294 --- diff --git a/ldapdb/models/query.py b/ldapdb/models/query.py index eb35061..f5c4020 100644 --- a/ldapdb/models/query.py +++ b/ldapdb/models/query.py @@ -122,8 +122,7 @@ class Query(BaseQuery): self.connection = ldapdb.connection def get_count(self): - # FIXME: use all object classes - filterstr = '(objectClass=%s)' % self.model.object_classes[0] + filterstr = ''.join(['(objectClass=%s)' % cls for cls in self.model.object_classes]) sql, params = self.where.as_sql() filterstr += sql filterstr = '(&%s)' % filterstr @@ -141,8 +140,7 @@ class Query(BaseQuery): return len(vals) def results_iter(self): - # FIXME: use all object classes - filterstr = '(objectClass=%s)' % self.model.object_classes[0] + filterstr = ''.join(['(objectClass=%s)' % cls for cls in self.model.object_classes]) sql, params = self.where.as_sql() filterstr += sql filterstr = '(&%s)' % filterstr