1
0
mirror of https://github.com/django/django.git synced 2025-03-27 01:30:46 +00:00

Made use of PathInfo.direct flag in trim_joins

Refs #19385
This commit is contained in:
Anssi Kääriäinen 2012-12-20 23:54:31 +02:00
parent 68985db482
commit 807eff7439

View File

@ -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: