summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/sql')
-rw-r--r--django/db/models/sql/query.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index ab5c41ed4f..81fcd6921f 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -1749,7 +1749,7 @@ class Query:
"""
group_by = list(self.select)
if self.annotation_select:
- for alias, annotation in self.annotation_select.items():
+ for annotation in self.annotation_select.values():
for col in annotation.get_group_by_cols():
group_by.append(col)
self.group_by = tuple(group_by)