1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #23604 -- Allowed related m2m fields to be references in the admin.

Thanks Simon Charette for review.
This commit is contained in:
Emmanuelle Delescolle
2014-10-05 20:06:51 +02:00
committed by Tim Graham
parent e501d4c505
commit a24cf21722
8 changed files with 37 additions and 5 deletions

View File

@@ -620,6 +620,10 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
response = self.client.get("/test_admin/admin/admin_views/m2mreference/", {TO_FIELD_VAR: 'id'})
self.assertEqual(response.status_code, 200)
# #23604 - Specifying the pk of this model should be allowed when this model defines a m2m relationship
response = self.client.get("/test_admin/admin/admin_views/ingredient/", {TO_FIELD_VAR: 'id'})
self.assertEqual(response.status_code, 200)
# #23329 - Specifying a field that is not refered by any other model directly registered
# to this admin site but registered through inheritance should be allowed.
response = self.client.get("/test_admin/admin/admin_views/referencedbyparent/", {TO_FIELD_VAR: 'id'})