diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 23f99e4..60fe952 100644
a
|
b
|
class BaseQuery(object):
|
1397 | 1397 | lhs_col = int_opts.parents[int_model].column |
1398 | 1398 | dedupe = lhs_col in opts.duplicate_targets |
1399 | 1399 | if dedupe: |
1400 | | avoid.update(self.dupe_avoidance.get(id(opts), lhs_col), |
1401 | | ()) |
| 1400 | avoid.update(self.dupe_avoidance.get((id(opts), lhs_col), ())) |
1402 | 1401 | dupe_set.add((opts, lhs_col)) |
1403 | 1402 | int_opts = int_model._meta |
1404 | 1403 | alias = self.join((alias, int_opts.db_table, lhs_col, |