summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRobin Ramael <robin.ramael@maykinmedia.nl>2018-01-03 11:57:18 +0100
committerTim Graham <timograham@gmail.com>2018-01-03 08:24:16 -0500
commitfbf647287ebd9898bff69c65a89fa09a903adaa5 (patch)
tree940794cd820c93d541320576d500c02c2fbe0240 /django
parent2cb6b7732dc7b172797cebb1e8f19be2de89e264 (diff)
Fixed #28811 -- Fixed crash when combining regular and group by annotations.
Diffstat (limited to 'django')
-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 7c88144fd2..bfee2256e6 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -1514,7 +1514,7 @@ class Query:
# that case we need to return a Ref to the subquery's annotation.
return Ref(name, self.annotation_select[name])
else:
- return self.annotation_select[name]
+ return self.annotations[name]
else:
field_list = name.split(LOOKUP_SEP)
join_info = self.setup_joins(field_list, self.get_meta(), self.get_initial_alias(), can_reuse=reuse)