-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
Deployment Type
Self-hosted
NetBox Version
v3.7.0
Python Version
3.10
Steps to Reproduce
- Start with a fresh NetBox 3.7.0 installation and database
- Post a custom-field choice-set whose choices are lists with just one element each (should be two elements each):
curl -H "Authorization: Token ${NETBOX_TOKEN}" \
'http://192.168.64.3/api/extras/custom-field-choice-sets/' \
-H 'accept: application/json' -H 'Content-Type: application/json' \
-d '[ { "name": "test1", "extra_choices": [ ["choice1"], ["choice2"] ] } ]'
- Log in to the web UI, navigate to Customization -> Custom Field Choices, and click on the test1 entry
Expected Behavior
The REST API should reject the POST data as invalid
AND/OR
The web UI should render a dialog showing that the choice set's choices have undefined labels
Observed Behavior
The REST API cheerfully creates the choice set with the choice labels undefined.
AND
The web UI displays an unstyled ValueError:
<class 'ValueError'>
Need 2 values to unpack in for loop; got 1.
Python version: 3.10.12
NetBox version: 3.7.0
Plugins: None installed
This problem was originally reported by @jordanrvillarreal.
Metadata
Metadata
Assignees
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application