store null as default value againt Null boolean field
An empty string ""
is not None
>>> "" is None
False
If you want the default to be None
then write:
employed = models.NullBooleanField(choices=LOCATOR_YES_NO_CHOICES,
max_length=3,
blank=True, null=True, default=None,)
Note that NullBooleanFIeld
was deprecated in Django 3.1
. It is recommended to use BooleanField(null=True)
.
In this case;
employed = Models.BooleanField(null=True, default=None)