Fixed #26522 -- Fixed a nondeterministic AssertionError in QuerySet combining.

Thanks Andrew Brown for the test case.
This commit is contained in:
Bo Marchman 2017-03-02 09:36:25 -05:00 committed by Tim Graham
parent dacdcec767
commit 9bbb6e2d25
4 changed files with 22 additions and 3 deletions

View file

@ -126,7 +126,7 @@ class Query:
# types they are. The key is the alias of the joined table (possibly
# the table name) and the value is a Join-like object (see
# sql.datastructures.Join for more information).
self.alias_map = {}
self.alias_map = OrderedDict()
# Sometimes the query contains references to aliases in outer queries (as
# a result of split_exclude). Correct alias quoting needs to know these
# aliases too.