-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Environment
- Python version: 3.11.11
- Nautobot version: 2.4.2
- nautobot-device-lifecycle-mgmt version: 2.2.1
Expected Behavior
The contract_type field on ContractLCM model is a CharField, is possible to assign any value to it through the backend or API.
It is expected to be able to edit and save the object over the Web UI, and also be able to choose a existing contract_type value when trying to add new contracts.
Observed Behavior
When trying to edit a contract over the Web UI, is not possible to save it if the contract has contract_type different from "Hardware" or "Software" as these are the only choices available to choose from.
Since the "Contract Type" field is required by the form, the only way to save the contract is by changing the contract_type to one of the two values provided by the ContractTypeChoices class.
Same thing occurs when trying to add a new contract, is not possible to choose a existing value different from the ones provided.
Steps to Reproduce
- Add a contract with a custom contract_type value over the API
- Try to edit the newly created contract, the "Contract Type" field will show as "---------"
- Try to save the object and the form will complain that no value was choose for the "Contract Type" field