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

Choices are not constraints... for Sal developers #401

Open
sheagcraig opened this issue Aug 4, 2020 · 1 comment
Open

Choices are not constraints... for Sal developers #401

sheagcraig opened this issue Aug 4, 2020 · 1 comment

Comments

@sheagcraig
Copy link
Contributor

Describe the bug
We have a number of choices arguments for models in Sal. This prevents users from inputting invalid values from forms... Unfortunately, the code itself can happily set values that are not one of the choices. This creates a situation where the DB may have values it was never meant to, and client code may blow up.

To Reproduce

  1. Check in a device and use the operatingsystem "AcornOS" or perhaps "Debian".
  2. Watch the operatingsystem plugin thrash.

Expected behavior
In most cases we probably want to reject invalid values.

@sheagcraig
Copy link
Contributor Author

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

No branches or pull requests

1 participant