Skip to content

PR #6641 breaks text custom field default value #6777

@bmhughes

Description

@bmhughes

NetBox version

v2.11.9

Python version

3.9

Steps to Reproduce

  1. Create a custom text type field.
  2. Try to set a default value.

Expected Behavior

Default value should be set.

Observed Behavior

ValidationError is raised because .validate for a text field tests against str when the field is a django.forms.fields.JSONString, trying to set a str value causes a Enter a valid JSON. error.

Metadata

Metadata

Assignees

Labels

status: 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