ngageoint / scale

Processing framework for containerized algorithms
http://ngageoint.github.io/scale/
Apache License 2.0
105 stars 45 forks source link

Reevaluate nullable and blank columns #1868

Open mheppner opened 4 years ago

mheppner commented 4 years ago

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: