ORM queries and Python code are made more complex because values will sometimes be
None and other times
The null attribute specifies that the field can be None (null at database level). This is useful for optional fields.
This adds complexity as the data type is inconsistent: some instances may be strings and others None. This complicates ORM queries and extra code must guard against performing str operations on a NoneType.
This problem is avoided by specifying default='' instead. The database will even throw an exception if there is an attempt to explicitly save None, thus avoiding bad data.
If we spot this issue in your GitHub pull request we give this advice:
Django Doctor will run this check by default. No configuration is needed but the check can be turned on/off using check code
nullable-string-field in your pyproject.toml file.