mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +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
|
@ -18,7 +18,7 @@ class BinaryData(models.Model):
|
|||
|
||||
|
||||
class BooleanData(models.Model):
|
||||
data = models.BooleanField(default=False)
|
||||
data = models.BooleanField(default=False, null=True)
|
||||
|
||||
|
||||
class CharData(models.Model):
|
||||
|
@ -226,10 +226,6 @@ class IntegerPKData(models.Model):
|
|||
class GenericIPAddressPKData(models.Model):
|
||||
data = models.GenericIPAddressField(primary_key=True)
|
||||
|
||||
# This is just a Boolean field with null=True, and we can't test a PK value of NULL.
|
||||
# class NullBooleanPKData(models.Model):
|
||||
# data = models.NullBooleanField(primary_key=True)
|
||||
|
||||
|
||||
class PositiveIntegerPKData(models.Model):
|
||||
data = models.PositiveIntegerField(primary_key=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue