diff options
| author | Tim Graham <timograham@gmail.com> | 2015-01-19 20:54:57 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-01-20 08:15:39 -0500 |
| commit | cb90d489da4247c1c7ced86a42a2d89488fec67c (patch) | |
| tree | d76adb6a10b15332f0560917690105130ea26030 | |
| parent | c80b2144d22d29725cf4d584bfa9079dd35af064 (diff) | |
[1.8.x] Fixed a query failure on Python 3.5; refs #23763.
The failure was introduced in Django by
c7fd9b242d2d63406f1de6cc3204e35aaa025233 and the change in
Python 3.5 is https://hg.python.org/cpython/rev/a3c345ba3563.
Backport of be1357e70983d4ad029a1ecdd05292f8be917a80 from master
| -rw-r--r-- | django/db/models/sql/query.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index c5e7eab28c..9693206b67 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -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) |
