Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove null=True from string fields #1049

Open
maurizi opened this issue May 31, 2018 · 0 comments
Open

Remove null=True from string fields #1049

maurizi opened this issue May 31, 2018 · 0 comments

Comments

@maurizi
Copy link
Contributor

maurizi commented May 31, 2018

We have null=True set for several string fields, which results in the empty state allowing both the empty string and null.

Which should remove null=True for these fields and write a data migration to change null values in those fields to an empty string.

Fields in question:

website_url = models.URLField(blank=True, null=True)

zipcode = models.CharField(max_length=5, null=True)
# In the admin interface, display the address right above the map, since it triggers geocoding
address = models.CharField(max_length=40, null=True,
help_text=('The map automatically updates as the address is typed, '
'but may be overridden manually if incorrect.'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants