mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #29227 -- Allowed BooleanField to be null=True.
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
This commit is contained in:
parent
73f7d1755f
commit
5fa4f40f45
32 changed files with 158 additions and 98 deletions
|
@ -23,6 +23,10 @@ class ValidationMessagesTest(TestCase):
|
|||
f = models.BooleanField()
|
||||
self._test_validation_messages(f, 'fõo', ["'fõo' value must be either True or False."])
|
||||
|
||||
def test_nullable_boolean_field_raises_error_message(self):
|
||||
f = models.BooleanField(null=True)
|
||||
self._test_validation_messages(f, 'fõo', ["'fõo' value must be either True, False, or None."])
|
||||
|
||||
def test_float_field_raises_error_message(self):
|
||||
f = models.FloatField()
|
||||
self._test_validation_messages(f, 'fõo', ["'fõo' value must be a float."])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue