Ticket #26515: ForeignObject_from_fields__bug_26515.patch
File ForeignObject_from_fields__bug_26515.patch, 745 bytes (added by , 9 years ago) |
---|
-
django/db/models/sql/query.py
<+>UTF-8
1441 1441 cur_targets = set(t.column for t in targets) 1442 1442 if not cur_targets.issubset(join_targets): 1443 1443 break 1444 targets = tuple(r[0] for r in info.join_field.related_fields if r[1].column in cur_targets) 1444 targets_dict = {r[1].column: r[0] for r in info.join_field.related_fields if r[1].column in cur_targets} 1445 targets = tuple(targets_dict[t.column] for t in targets) 1445 1446 self.unref_alias(joins.pop()) 1446 1447 return targets, joins[-1], joins 1447 1448