Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

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

@sheagcraig

Description

@sheagcraig

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions