mirror of
https://github.com/django/django.git
synced 2025-12-03 08:32:59 +00:00
Fixed #28811 -- Fixed crash when combining regular and group by annotations.
This commit is contained in:
parent
2cb6b7732d
commit
fbf647287e
2 changed files with 19 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue