diff options
| author | Christopher Medrela <chris.medrela@gmail.com> | 2014-02-15 15:36:07 +0100 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2014-02-15 17:24:05 +0100 |
| commit | d0133504e57589dc8983a20bf488e069bddd772c (patch) | |
| tree | 9a5dac3076493121c8d672dbf8d94948ed223af4 /django | |
| parent | 65b421c6613dab85039d5d7b9601528ad9e6038c (diff) | |
Fixed #22047 -- detecting related_name clash with inheritance
Thanks to mondone for fruitful colaboration.
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/fields/related.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py index 98ec36b656..3c022d6fcc 100644 --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -183,7 +183,7 @@ class RelatedField(Field): # Check clashes between accessor or reverse query name of `field` # and any other field name -- i. e. accessor for Model.foreign is # model_set and it clashes with Target.model_set. - potential_clashes = rel_opts.fields + rel_opts.local_many_to_many + potential_clashes = rel_opts.fields + rel_opts.many_to_many for clash_field in potential_clashes: clash_name = "%s.%s" % (rel_opts.object_name, clash_field.name) # i. e. "Target.model_set" |
