String type in custom fields #6236

Closed
opened 2025-12-29 19:38:22 +01:00 by adam · 1 comment
Owner

Originally created by @jk-onnet on GitHub (Mar 21, 2022).

NetBox version

v3.1.9

Python version

3.9

Steps to Reproduce

  1. Create custom fields "iamastring" in "virtualization > virtualmachine" with default value "" (empty string)
  2. Edit virtualmachine custom fields "iamastring" without putting any value ( GUI )
  3. Virtual machine custom fields "iamastring" is changed from "" to null

Expected Behavior

No change on string custom fields

Observed Behavior

Change on string custom fields ( "" ---> null )

Originally created by @jk-onnet on GitHub (Mar 21, 2022). ### NetBox version v3.1.9 ### Python version 3.9 ### Steps to Reproduce 1. Create custom fields "iamastring" in "virtualization > virtualmachine" with default value "" (empty string) 2. Edit virtualmachine custom fields "iamastring" without putting any value ( GUI ) 3. Virtual machine custom fields "iamastring" is changed from "" to null ### Expected Behavior No change on string custom fields ### Observed Behavior Change on string custom fields ( "" ---> null )
adam closed this issue 2025-12-29 19:38:23 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 22, 2022):

This behavior is expected. Empty values are returned as null. There is no need to specify the default value as an empty string.

@jeremystretch commented on GitHub (Mar 22, 2022): This behavior is expected. Empty values are returned as null. There is no need to specify the default value as an empty string.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6236