diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2013-09-24 18:42:40 +0300 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2013-09-24 19:04:42 +0300 |
| commit | 1a922870ea07e730281c0e2a7b3a170232a81236 (patch) | |
| tree | 737d4665aec4547049b918c9ad97758aa721c631 /django/db/models/sql | |
| parent | d30d66b90728b8dc173c050c63c86e5af3ab7c40 (diff) | |
[1.6.x] Fixed #21150 -- Improved Query.add_fields() join promotion logic
Thanks to Eivind Fonn for the report and test case.
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/query.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 510b21b64b..45276640e0 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1525,7 +1525,7 @@ class Query(object): for name in field_names: field, targets, u2, joins, path = self.setup_joins( name.split(LOOKUP_SEP), opts, alias, None, allow_m2m, - True) + allow_explicit_fk=True, outer_if_first=True) # Trim last join if possible targets, final_alias, remaining_joins = self.trim_joins(targets, joins[-2:], path) |
