summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/db/models/query.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py
index 7d41fe1ca6..5969ab128c 100644
--- a/django/db/models/query.py
+++ b/django/db/models/query.py
@@ -625,7 +625,7 @@ class QuerySet(object):
% arg.default_alias)
kwargs[arg.default_alias] = arg
- names = set([f.name for f in self.model._meta.fields])
+ names = set(self.model._meta.get_all_field_names())
for aggregate in kwargs:
if aggregate in names:
raise ValueError("The %s annotation conflicts with a field on "