diff options
| author | Carl Meyer <carl@oddbird.net> | 2010-10-10 08:04:14 +0000 |
|---|---|---|
| committer | Carl Meyer <carl@oddbird.net> | 2010-10-10 08:04:14 +0000 |
| commit | 2f17dd3dd0fdcecf179375af32983a952bd7dfd9 (patch) | |
| tree | c50bdba3f07a365edf9bc113cc9896bede32a544 /django/db | |
| parent | ace6519fae94c83aaaee0e6ce04d3bdded1b91d5 (diff) | |
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.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db')
| -rw-r--r-- | django/db/models/query.py | 2 |
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 " |
