Fixed #27904 -- Added a system check that Field.validators are callable.

This commit is contained in:
Adam Chainz 2017-03-05 16:50:33 +00:00 committed by Tim Graham
parent 75503a823f
commit a452dddb25
4 changed files with 39 additions and 1 deletions

View file

@ -102,7 +102,7 @@ class RelativeFieldTests(SimpleTestCase):
m2m = models.ManyToManyField(
Model,
null=True,
validators=[''],
validators=[lambda x: x],
limit_choices_to={'name': 'test_name'},
through='ThroughModel',
through_fields=('modelm2m', 'model'),