X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fdjango-ldapdb.git;a=blobdiff_plain;f=ldapdb%2Fmodels%2Fquery.py;h=e79a8bc0b6768e7040222f2e76372b959eb41802;hp=6eaecb117fcdb6232a0d7af33b1f796e2a310d48;hb=b8b8862cd9e29290abcd2332c42104313dc4c23e;hpb=5b07fe4646e8171565701bef9884d257f18cf65c diff --git a/ldapdb/models/query.py b/ldapdb/models/query.py index 6eaecb1..e79a8bc 100644 --- a/ldapdb/models/query.py +++ b/ldapdb/models/query.py @@ -37,7 +37,12 @@ class WhereNode(BaseWhereNode): if isinstance(item, WhereNode): bits.append(item.as_sql()) continue - table, column, type, x, y, values = item + if len(item) == 4: + # django 1.1 + (table, column, type), x, y, values = item + else: + # django 1.0 + table, column, type, x, y, values = item if self.negated: bits.append('(!(%s=%s))' % (column,values[0])) else: