Fixed #33131 -- Improved error messages for clashing reverse accessor names.

This commit is contained in:
Bernd Wechner 2021-09-22 15:53:10 +10:00 committed by Mariusz Felisiak
parent 402ae37873
commit 2116238d5f
4 changed files with 72 additions and 60 deletions

View file

@ -292,8 +292,9 @@ class AbstractInheritanceTests(SimpleTestCase):
Foo._meta.get_field('foo').check(),
[
Error(
"Reverse accessor for 'model_inheritance.Foo.foo' clashes "
"with field name 'model_inheritance.Descendant.foo'.",
"Reverse accessor 'Descendant.foo' for "
"'model_inheritance.Foo.foo' clashes with field name "
"'model_inheritance.Descendant.foo'.",
hint=(
"Rename field 'model_inheritance.Descendant.foo', or "
"add/change a related_name argument to the definition "