Skip to content

Surrounding quotes of JSON custom field's simple string default value lost when editing device #15896

Closed
@drustan

Description

@drustan

Deployment Type

Self-hosted

NetBox Version

v3.7.6

Python Version

3.11

Steps to Reproduce

  • Add a custom field of type JSON (extras/custom-fields/add/)
    In the form use DCIM > Device as Content types, testing as name, JSON as type and "testing" (with the double quotes) as default value. Leave all the rest as it is and click create.
  • Navigate to a device page.
  • Click to edit the device.
  • Try to save without changing anything. An Error Enter a valid JSON will show up (the surrounding quotes of the JSON custom fields values are lost, you can't save unless adding the quotes around the value testing in the JSON custom fields)

Expected Behavior

When editing a device, surrounding quotes of JSON custom field values should be kept.

Observed Behavior

Surrounding quotes of already defined JSON custom field values are lost when editing a device.

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

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions