diff options
Diffstat (limited to 'django/db/models/sql')
| -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 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) |
