From f6a7be3e0e92faae7d60e807d584c9560c988ae7 Mon Sep 17 00:00:00 2001 From: jlaine Date: Mon, 24 May 2010 18:15:01 +0000 Subject: [PATCH] use all object classes when performing search git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@876 e071eeec-0327-468d-9b6a-08194a12b294 --- ldapdb/models/query.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 -- 2.30.2