diff options
author | Shubham singh <shubham1.singh15@gmail.com> | 2019-12-17 02:46:39 +0530 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-12-17 09:15:01 +0100 |
commit | f4647179ccd13c852563205273163b641d4b01a5 (patch) | |
tree | 1c1610b8909b6ad67a629ac112875521cc510243 /tests/admin_checks | |
parent | ff00a053478fee06bdfb4206c6d4e079e98640ff (diff) | |
download | django-f4647179ccd13c852563205273163b641d4b01a5.tar.gz |
Fixed #31086 -- Improved error message for admin model inlines with more than one foreign key to the same parent.
Diffstat (limited to 'tests/admin_checks')
-rw-r--r-- | tests/admin_checks/tests.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/admin_checks/tests.py b/tests/admin_checks/tests.py index 1829294a47..2a9643cd95 100644 --- a/tests/admin_checks/tests.py +++ b/tests/admin_checks/tests.py @@ -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', ) |