-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surrounding quotes of JSON custom field's simple string default value lost when editing device #15896
Comments
Thank you for opening a bug report. I was unable to reproduce the reported behavior on NetBox v3.7.6 in my lab. Please re-confirm the reported behavior and adjust your post above as necessary. Remember to provide detailed steps that someone else can follow using a clean installation of NetBox to reproduce the issue. The demo system's database has been through a lot and may be a factor in what you're experiencing, which is why the bug report template explicitly states that the demo system should not be relied on when reporting bugs. |
Hi, and thank you for your quick response. I've just updated the steps to reproduce the error. Forget about the demo instance then; I thought it would be easier since we both have access to it—sorry about that. The bug actually appeared recently; it was not present in version 3.5.X. Can you reproduce the bug now? |
Okay, the clarified steps got me there, thanks. This problem seems to happen only when the field's default value is exactly a quoted string. If the default value is a list or associative array, the problem does not occur for me in 3.7.6. I'm updating the summary and moving to |
Deployment Type
Self-hosted
NetBox Version
v3.7.6
Python Version
3.11
Steps to Reproduce
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.
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.
The text was updated successfully, but these errors were encountered: