Closed GoogleCodeExporter closed 8 years ago
houpss, in attachment the correct one:
--- multilingual/query.py.orig 2009-01-06 22:21:31.000000000 +0100
+++ multilingual/query.py 2009-01-06 22:58:14.000000000 +0100
@@ -14,7 +14,7 @@
from django.db.models.sql.query import Query
from django.db.models.sql.datastructures import Count, EmptyResultSet, Empty, MultiJoin
from django.db.models.sql.constants import *
-from django.db.models.sql.where import WhereNode, EverythingNode, AND, OR
+from django.db.models.sql.where import WhereNode, Constraint, EverythingNode,
AND, OR
from multilingual.languages import (get_translation_table_alias, get_language_id_list,
get_default_language, get_translated_field_alias,
@@ -140,7 +140,7 @@
trans_table_alias = get_translation_table_alias(
model._meta.db_table, language_id)
new_table = (master_table_name + "__" + trans_table_alias)
- self.where.add((new_table, field.column, field,
lookup_type,
value), connector)
+ self.where.add((Constraint(new_table, field.column, field),
lookup_type, value), connector)
return
final = len(join_list)
@@ -206,7 +206,8 @@
self.promote_alias_chain(join_it, join_promote)
self.promote_alias_chain(table_it, table_promote)
- self.where.add((alias, col, field, lookup_type, value), connector)
+ self.where.add((Constraint(alias, col, field), lookup_type, value),
+ connector)
if negate:
self.promote_alias_chain(join_list)
@@ -216,7 +217,7 @@
if self.alias_map[alias][JOIN_TYPE] == self.LOUTER:
j_col = self.alias_map[alias][RHS_JOIN_COL]
entry = self.where_class()
- entry.add((alias, j_col, None, 'isnull', True),
AND)
+ entry.add((Constraint(alias, j_col, None),
'isnull',
True), AND)
entry.negate()
self.where.add(entry, AND)
break
@@ -225,7 +226,7 @@
# exclude the "foo__in=[]" case from this handling, because
# it's short-circuited in the Where class.
entry = self.where_class()
- entry.add((alias, col, None, 'isnull', True), AND)
+ entry.add((Constraint(alias, col, None), 'isnull', True),
AND)
entry.negate()
self.where.add(entry, AND)
Original comment by m.meylan@gmail.com
on 6 Jan 2009 at 10:01
Attachments:
Thank you very much for the patch, this fixes also a (same) problem with
manage.py
loaddata.
Günter
Original comment by guenter....@wanagu.at
on 9 Jan 2009 at 10:54
Fixed in rev. 155, thanks!
Original comment by marcin.k...@gmail.com
on 18 Feb 2009 at 4:23
Original issue reported on code.google.com by
m.meylan@gmail.com
on 6 Jan 2009 at 9:34Attachments: