[PR #14901] [MERGED] Fixes #14838: JSONField should treat initial form data as JSON #14479

Closed
opened 2025-12-29 23:24:42 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/14901
Author: @jeremystretch
Created: 1/23/2024
Status: Merged
Merged: 1/24/2024
Merged by: @jeremystretch

Base: developHead: 14838-eventrule-conditions


📝 Commits (1)

  • 2d80867 Fixes #14838: JSONField should treat initial form data as JSON

📊 Changes

1 file changed (+6 additions, -1 deletions)

View changed files

📝 netbox/utilities/forms/fields/fields.py (+6 -1)

📄 Description

Fixes: #14838

If the field's initial value is a string, attempt to load it as JSON. Also updates the call to dumps() afterward with additional arguments from the parent class' implementation.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/14901 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 1/23/2024 **Status:** ✅ Merged **Merged:** 1/24/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `14838-eventrule-conditions` --- ### 📝 Commits (1) - [`2d80867`](https://github.com/netbox-community/netbox/commit/2d8086788d042424c2c2c38978144373b61e3b0a) Fixes #14838: JSONField should treat initial form data as JSON ### 📊 Changes **1 file changed** (+6 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/utilities/forms/fields/fields.py` (+6 -1) </details> ### 📄 Description ### Fixes: #14838 If the field's initial value is a string, attempt to load it as JSON. Also updates the call to `dumps()` afterward with additional arguments from the parent class' implementation. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:24:42 +01:00
adam closed this issue 2025-12-29 23:24:42 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14479