Skip to content

JSON custom field with default value {} is set as null #20221

@lucagubler

Description

@lucagubler

Deployment Type

Self-hosted

NetBox Version

v4.3.7

Python Version

3.12

Steps to Reproduce

  1. Create a new custom field test_config of type JSON with default value {} (empty dict) and assign it to virtual machines.
  2. Create a new virtual machine but leave the test_config custom field blank.
  3. Virtual machine is created, but test_config is set to null instead of empty dict {}

Expected Behavior

The default value should be set to an empty dict {} instead of null

Observed Behavior

The default value was set to null

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions