Fixed #11764 -- Added a missing set of parentheses in a call calculating the select_related tables. Thanks to aurelio for the report and original patch, and wogan for the updated patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2010-04-23 14:25:29 +00:00
parent 5866875547
commit d9a0fd48ba
2 changed files with 11 additions and 4 deletions

View file

@ -546,8 +546,8 @@ class SQLCompiler(object):
lhs_col = int_opts.parents[int_model].column
dedupe = lhs_col in opts.duplicate_targets
if dedupe:
avoid.update(self.query.dupe_avoidance.get(id(opts), lhs_col),
())
avoid.update(self.query.dupe_avoidance.get((id(opts), lhs_col),
()))
dupe_set.add((opts, lhs_col))
int_opts = int_model._meta
alias = self.query.join((alias, int_opts.db_table, lhs_col,
@ -620,8 +620,8 @@ class SQLCompiler(object):
lhs_col = int_opts.parents[int_model].column
dedupe = lhs_col in opts.duplicate_targets
if dedupe:
avoid.update(self.query.dupe_avoidance.get(id(opts), lhs_col),
())
avoid.update((self.query.dupe_avoidance.get(id(opts), lhs_col),
()))
dupe_set.add((opts, lhs_col))
int_opts = int_model._meta
alias = self.query.join(