mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #24525 -- Fixed AssertionError in some complex queries.
Thanks Anssi Kääriäinen for providing the solution.
This commit is contained in:
@@ -556,7 +556,8 @@ class Query(object):
|
||||
# distinct joins for the same connection in rhs query, then the
|
||||
# combined query must have two joins, too.
|
||||
reuse.discard(new_alias)
|
||||
change_map[alias] = new_alias
|
||||
if alias != new_alias:
|
||||
change_map[alias] = new_alias
|
||||
if not rhs.alias_refcount[alias]:
|
||||
# The alias was unused in the rhs query. Unref it so that it
|
||||
# will be unused in the new query, too. We have to add and
|
||||
|
||||
Reference in New Issue
Block a user