Adding a FIELD_CHOICES doesn't work correctly. #8744

Closed
opened 2025-12-29 20:40:40 +01:00 by adam · 1 comment
Owner

Originally created by @damo2929 on GitHub (Oct 13, 2023).

NetBox version

v3.6.3

Python version

3.10

Steps to Reproduce

I am trying to add additional status values to vlan

I have added the following to configuration.py
FIELD_CHOICES = {
'ipam.VLAN.status+': (
('planned' , 'Planned' , 'blue')
)
}

then systemctl restart netbox netbox-rq

Expected Behavior

expected behaviour is that when opening vlan that the new planned status is on the list.

Observed Behavior

instead of the new planned status I get 3 lines with | instead

image

Originally created by @damo2929 on GitHub (Oct 13, 2023). ### NetBox version v3.6.3 ### Python version 3.10 ### Steps to Reproduce I am trying to add additional status values to vlan I have added the following to configuration.py FIELD_CHOICES = { 'ipam.VLAN.status+': ( ('planned' , 'Planned' , 'blue') ) } then systemctl restart netbox netbox-rq ### Expected Behavior expected behaviour is that when opening vlan that the new planned status is on the list. ### Observed Behavior instead of the new planned status I get 3 lines with | instead ![image](https://github.com/netbox-community/netbox/assets/43962340/89dbdb24-2373-4317-a10f-2b402fec5f82)
adam closed this issue 2025-12-29 20:40:40 +01:00
Author
Owner

@DanSheps commented on GitHub (Oct 13, 2023):

FIELD_CHOICES = {
'ipam.VLAN.status+': (
('planned' , 'Planned' , 'blue')
)
}

Try (comma at the end of the choices):

FIELD_CHOICES = {
    'ipam.VLAN.status+': (
        ('planned' , 'Planned' , 'blue'),
    )
}
@DanSheps commented on GitHub (Oct 13, 2023): > FIELD_CHOICES = { > 'ipam.VLAN.status+': ( > ('planned' , 'Planned' , 'blue') > ) > } Try (comma at the end of the choices): ```python FIELD_CHOICES = { 'ipam.VLAN.status+': ( ('planned' , 'Planned' , 'blue'), ) } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8744