Default values for custom_fields are ignored in API when custom_fields section is used #18669
Labels
severity: low
Does not significantly disrupt application functionality, or a workaround is available
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
Milestone
Deployment Type
Self-hosted
NetBox Version
v4.2.3
Python Version
3.12
Steps to Reproduce
{ "prefix": "10.0.0.0/24", "status": "active", "description": "Test prefix", "vlan": "147", "is_pool": false, "tenant": 6 }
{ "prefix": "10.0.0.0/24", "status": "active", "description": "Test prefix", "vlan": "147", "is_pool": false, "tenant": 6, "custom_fields": { "primary_subnet": true } }
{ "prefix": "10.0.0.0/24", "status": "active", "description": "Test prefix", "vlan": "147", "is_pool": false, "tenant": 6, "custom_fields": { "ripe_netname": "test" } }
Expected Behavior
Observed Behavior
As soon as a custom_fields section is available in the POST Body then the default values for all custom_fields are ignored.
When I do not send the custom_fields section at all then the default values are used correctly.
The text was updated successfully, but these errors were encountered: