mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Removed code that assumed BooleanField could be null.
Such a field will no longer pass model validation.
This commit is contained in:
@@ -259,9 +259,6 @@ class BooleanFieldTests(unittest.TestCase):
|
||||
formfield with the blank option (#9640, #10549).
|
||||
"""
|
||||
choices = [(1, 'Si'), (2, 'No')]
|
||||
f = models.BooleanField(choices=choices, default=1, null=True)
|
||||
self.assertEqual(f.formfield().choices, [('', '---------')] + choices)
|
||||
|
||||
f = models.BooleanField(choices=choices, default=1, null=False)
|
||||
self.assertEqual(f.formfield().choices, choices)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user