fixup
authorjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 7 Sep 2009 09:00:58 +0000 (09:00 +0000)
committerjlaine <jlaine@e071eeec-0327-468d-9b6a-08194a12b294>
Mon, 7 Sep 2009 09:00:58 +0000 (09:00 +0000)
git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@649 e071eeec-0327-468d-9b6a-08194a12b294

ldapdb/models/query.py

index 0aba5be23280063259e8b236f48d5b2d1345f577..def325f90ce29281f11d929f9914611bcce9b934 100644 (file)
@@ -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: