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 775e2668b0..c858816289 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -443,7 +443,7 @@ class Query(BaseExpression):
return {}
existing_annotations = {
alias: annotation
- for alias, annotation in self.annotation_select.items()
+ for alias, annotation in self.annotations.items()
if alias not in added_aggregate_names
}
# Existing usage of aggregation can be determined by the presence of