Custom fields: default value not being set for boolean type #604

Closed
opened 2025-12-29 16:23:45 +01:00 by adam · 2 comments
Owner

Originally created by @Armadill0 on GitHub (Jan 4, 2017).

I have a custom field for devices of the type boolean. It is not required, but filterable and has the default value "false" like described on the admin site.

When I go to the page to add a new device, the default value is not set for this field. Instead only "---------" is displayed, but "True" and "False" are only selectable via the drop down menu. It seems boolean defaults don't work at all. I also testet "False", "true" and "True" as defaults and neither of them have been inserted as default value.

Text and integer fields work well. So it seems to be only an issue with the boolean type.

Originally created by @Armadill0 on GitHub (Jan 4, 2017). I have a custom field for devices of the type boolean. It is not required, but filterable and has the default value "false" like described on the admin site. When I go to the page to add a new device, the default value is not set for this field. Instead only "---------" is displayed, but "True" and "False" are only selectable via the drop down menu. It seems boolean defaults don't work at all. I also testet "False", "true" and "True" as defaults and neither of them have been inserted as default value. Text and integer fields work well. So it seems to be only an issue with the boolean type.
adam added the type: bug label 2025-12-29 16:23:45 +01:00
adam closed this issue 2025-12-29 16:23:45 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 4, 2017):

What version of NetBox are you running?

@jeremystretch commented on GitHub (Jan 4, 2017): What version of NetBox are you running?
Author
Owner

@Armadill0 commented on GitHub (Jan 4, 2017):

1.8.0

I recognized this bug already on older versions, but forgot to report it.

@Armadill0 commented on GitHub (Jan 4, 2017): 1.8.0 I recognized this bug already on older versions, but forgot to report it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#604