# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-# -*- coding: utf-8 -*-
-
from copy import deepcopy
import ldap
else:
# 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:
+ clause = equal_bits[0]
if self.negated:
- bits.append('(!(%s=%s))' % (column,values[0]))
+ bits.append('(!%s)' % clause)
else:
- bits.append('(%s=%s)' % (column,values[0]))
+ bits.append(clause)
if len(bits) == 1:
return bits[0]
elif self.connector == AND: