mirror of
https://github.com/django/django.git
synced 2025-08-31 15:57:45 +00:00
Fixed #31086 -- Improved error message for admin model inlines with more than one foreign key to the same parent.
This commit is contained in:
parent
ff00a05347
commit
f4647179cc
3 changed files with 7 additions and 3 deletions
|
@ -636,7 +636,9 @@ class SystemChecksTestCase(SimpleTestCase):
|
|||
errors = MyAdmin(Album, AdminSite()).check()
|
||||
expected = [
|
||||
checks.Error(
|
||||
"'admin_checks.TwoAlbumFKAndAnE' has more than one ForeignKey to 'admin_checks.Album'.",
|
||||
"'admin_checks.TwoAlbumFKAndAnE' has more than one ForeignKey "
|
||||
"to 'admin_checks.Album'. You must specify a 'fk_name' "
|
||||
"attribute.",
|
||||
obj=TwoAlbumFKAndAnEInline,
|
||||
id='admin.E202',
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue