Fixed #31310 -- Fixed hints in checks for using intermediate model with ambiguous foreign key.

symmetrical=False is not required since
87b1ad6e73.
This commit is contained in:
Matheus Cunha Motta 2020-02-26 15:08:55 -03:00 committed by Mariusz Felisiak
parent 308fab9241
commit e908eb6287
2 changed files with 5 additions and 6 deletions

View file

@ -150,15 +150,14 @@ class RelativeFieldTests(SimpleTestCase):
"through_fields keyword argument.",
hint=(
'If you want to create a recursive relationship, use '
'ForeignKey("self", symmetrical=False, '
'through="AmbiguousRelationship").'
'ManyToManyField("self", through="AmbiguousRelationship").'
),
obj=field,
id='fields.E334',
),
])
def test_ambiguous_relationship_model(self):
def test_ambiguous_relationship_model_to(self):
class Person(models.Model):
pass
@ -182,7 +181,7 @@ class RelativeFieldTests(SimpleTestCase):
"keyword argument.",
hint=(
'If you want to create a recursive relationship, use '
'ForeignKey("self", symmetrical=False, through="AmbiguousRelationship").'
'ManyToManyField("self", through="AmbiguousRelationship").'
),
obj=field,
id='fields.E335',