From b8b8862cd9e29290abcd2332c42104313dc4c23e Mon Sep 17 00:00:00 2001 From: jlaine Date: Fri, 14 Aug 2009 14:11:25 +0000 Subject: [PATCH] django 1.1 compatibility git-svn-id: https://svn.bolloretelecom.eu/opensource/django-ldapdb/trunk@473 e071eeec-0327-468d-9b6a-08194a12b294 --- ldapdb/models/query.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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: -- 2.30.2