mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.10.x] Fixed #26998 -- Reverted some admin checks from checking field.many_to_many back to isinstance(field, models.ManyToManyField).
This partially reverts983c158da7Backport of384f89f8f8from master
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							ae0f55eb49
						
					
				
				
					commit
					4073780219
				
			| @@ -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): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user