Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Made use of PathInfo.direct flag in trim_joins

Refs #19385
  • Loading branch information...
commit 807eff74396faba24ad420236d83e9716feffe1e 1 parent 68985db
@akaariai akaariai authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  django/db/models/sql/query.py
View
3  django/db/models/sql/query.py
@@ -1445,8 +1445,7 @@ def trim_joins(self, target, joins, path):
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:
Please sign in to comment.
Something went wrong with that request. Please try again.