Database validation for model field choices #2185
Labels
[C] Backend
Focuses on backend implementation
[P] Minor
Minor priority
[S] Small
This issue should require only small changes.
See discussion in #1776. Django doesn't actually validate on the database level that only choice values are stored. This lead to us not noticing an outdated test data dump in #1776.
Optimally, we'd like to have database constraints for all model fields with choices, and we would like to not repeat the choices. See the discussion at #1776 for a suggested approach using a decorator that seems reasonable to me at first glance.
The text was updated successfully, but these errors were encountered: