mirror of
https://github.com/django/django.git
synced 2024-12-27 19:46:22 +00:00
[1.8.x] Fixed a query failure on Python 3.5; refs #23763.
The failure was introduced in Django byc7fd9b242d
and the change in Python 3.5 is https://hg.python.org/cpython/rev/a3c345ba3563. Backport ofbe1357e709
from master
This commit is contained in:
parent
c80b2144d2
commit
cb90d489da
@ -402,7 +402,7 @@ class Query(object):
|
||||
# Remove any aggregates marked for reduction from the subquery
|
||||
# and move them to the outer AggregateQuery.
|
||||
col_cnt = 0
|
||||
for alias, expression in inner_query.annotation_select.items():
|
||||
for alias, expression in list(inner_query.annotation_select.items()):
|
||||
if expression.is_summary:
|
||||
expression, col_cnt = inner_query.rewrite_cols(expression, col_cnt)
|
||||
outer_query.annotations[alias] = expression.relabeled_clone(relabels)
|
||||
|
Loading…
Reference in New Issue
Block a user