summaryrefslogtreecommitdiff
path: root/django/db/models/query.py
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2010-10-10 08:06:39 +0000
committerCarl Meyer <carl@oddbird.net>2010-10-10 08:06:39 +0000
commit700c5a3dfe46155ae367345eb4e7a04013bb6548 (patch)
tree19ae93689069b5f1afdb48e20a86cdb35abe04ed /django/db/models/query.py
parent4395b6575b4b18f287ce7eeea81a40205c1c5a40 (diff)
[1.2.X] Refs #11256 -- Extended the annotation field name conflict check to cover m2ms and reverse related descriptors as well. This is needed to actually cover the case raised by #14373. Backport of [14116].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14117 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/query.py')
-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 7914e84d22..2c679b04a6 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 "