From: jlaine Date: Fri, 14 Aug 2009 14:11:25 +0000 (+0000) Subject: django 1.1 compatibility X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=b8b8862cd9e29290abcd2332c42104313dc4c23e;p=matthijs%2Fupstream%2Fdjango-ldapdb.git django 1.1 compatibility git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@473 e071eeec-0327-468d-9b6a-08194a12b294 --- 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: