diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2012-12-20 23:54:31 +0200 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2012-12-30 11:20:13 +0200 |
| commit | 807eff74396faba24ad420236d83e9716feffe1e (patch) | |
| tree | 1c3bc5acdc5a246068c778b4e166c44f1c0a170f /django/db/models/sql/query.py | |
| parent | 68985db48212c701a3d975636123a5d79bdc006f (diff) | |
Made use of PathInfo.direct flag in trim_joins
Refs #19385
Diffstat (limited to 'django/db/models/sql/query.py')
| -rw-r--r-- | django/db/models/sql/query.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 2546d6c889..43ba519a68 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1445,8 +1445,7 @@ class Query(object): the join. """ for info in reversed(path): - direct = info.join_field == info.from_field - if info.to_field == target and direct: + if info.to_field == target and info.direct: target = info.from_field self.unref_alias(joins.pop()) else: |
