Custom integer fields display as true/false when set to 0 or 1 #466

Closed
opened 2025-12-29 16:22:27 +01:00 by adam · 0 comments
Owner

Originally created by @matt852 on GitHub (Oct 5, 2016).

This is related to creating a custom field for a device and setting it as an integer value. When either 0 or 1 is used when creating/editing a device, it shows up as a red X or green checkmark (and False or True when hovered over) once saved and viewing the device page.

If a value of 2 or greater is used, the number shows up correctly.

Example screenshot attached. In the image, the "# of cores (per socket)" setting is a custom integer field. It was set to 0 in the device configuration page, but shows up as a False value.
screen shot 2016-10-05 at 1 37 12 pm

Originally created by @matt852 on GitHub (Oct 5, 2016). This is related to creating a custom field for a device and setting it as an integer value. When either 0 or 1 is used when creating/editing a device, it shows up as a red X or green checkmark (and False or True when hovered over) once saved and viewing the device page. If a value of 2 or greater is used, the number shows up correctly. Example screenshot attached. In the image, the "# of cores (per socket)" setting is a custom integer field. It was set to 0 in the device configuration page, but shows up as a False value. <img width="714" alt="screen shot 2016-10-05 at 1 37 12 pm" src="https://cloud.githubusercontent.com/assets/536467/19124380/f9eb99d0-8b00-11e6-98fa-6c47ce7b51e4.png">
adam added the type: bug label 2025-12-29 16:22:27 +01:00
adam closed this issue 2025-12-29 16:22:27 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#466