From: jlaine Date: Mon, 7 Sep 2009 09:00:58 +0000 (+0000) Subject: fixup X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=cbd1e8c9fa9603b345a6a3ba07b8073c5fbfe727;p=matthijs%2Fupstream%2Fdjango-ldapdb.git fixup git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@649 e071eeec-0327-468d-9b6a-08194a12b294 --- diff --git a/ldapdb/models/query.py b/ldapdb/models/query.py index 0aba5be..def325f 100644 --- a/ldapdb/models/query.py +++ b/ldapdb/models/query.py @@ -42,10 +42,10 @@ class WhereNode(BaseWhereNode): # django 1.0 table, column, type, x, y, values = item equal_bits = [ "(%s=%s)" % (column, value) for value in values ] - if len(equal_bits) > 1: - clause = '(|%s)' % ''.join(equal_bits) - else: + if len(equal_bits) == 1: clause = equal_bits[0] + else: + clause = '(|%s)' % ''.join(equal_bits) if self.negated: bits.append('(!%s)' % clause) else: