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

Reevaluate nullable and blank columns #1868

Open
mheppner opened this issue Mar 18, 2020 · 0 comments
Open

Reevaluate nullable and blank columns #1868

mheppner opened this issue Mar 18, 2020 · 0 comments
Labels

Comments

@mheppner
Copy link
Contributor

Description
Some models have blank=True and/or null=True on CharFields. Char fields should almost never allow both null, empty values, and characters, unless there is some unique logic in the backend that is directly dependent on those distinctions.

Reproduction Steps
Steps to reproduce the problem:

  1. Create a recipe type, filling out title
  2. View the recipe to see the generated name field
  3. Edit the recipe and delete the value from title

The recipe type will happily save with an empty title. The name field should never change after the first creation.

Expected behavior
In this case, I don't think title should ever be empty or nullable. I don't know if the backend is specifically looking for nulls or empty strings for some case (maybe some query is actually looking at those values).

Additional context
Additional validation should also be in place in the UI, I'll link that issue next.

Additionally, these models also have a similar situation:

  • Batch
  • DataSet
  • Strike
@mheppner mheppner added the bug label Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant