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

Fixed #26998 -- Reverted some admin checks from checking field.many_to_many back to isinstance(field, models.ManyToManyField).

This partially reverts 983c158da7
This commit is contained in:
Collin Anderson
2016-08-18 12:45:27 -04:00
committed by Tim Graham
parent a3db480393
commit 384f89f8f8
5 changed files with 20 additions and 15 deletions

View File

@@ -925,7 +925,7 @@ class PrepopulatedFieldsCheckTests(CheckTestCase):
self.assertIsInvalid(
ValidationTestModelAdmin, ValidationTestModel,
("The value of 'prepopulated_fields' refers to 'users', which must not be "
"a DateTimeField, a foreign key, or a many-to-many field."),
"a DateTimeField, a ForeignKey, or a ManyToManyField."),
'admin.E028')
def test_valid_case(self):
@@ -963,7 +963,7 @@ class ListDisplayTests(CheckTestCase):
self.assertIsInvalid(
ValidationTestModelAdmin, ValidationTestModel,
"The value of 'list_display[0]' must not be a many-to-many field.",
"The value of 'list_display[0]' must not be a ManyToManyField.",
'admin.E109')
def test_valid_case(self):