Opened 8 weeks ago
Last modified 8 weeks ago
#36076 closed New feature
Raise a check error if null=False and default=None — at Initial Version
Description ¶
If a field has null=False
Django shouldn't allow setting default=None
.
class Model(models.Model): text = models.TextField(default=None)
This will raise an IntegrityError
on create.
It could be prevented with a system check.
Same applies to db_default
.
Note:
See TracTickets
for help on using tickets.