瀏覽代碼

fixed json field save issue #14689

Abhimanyu Saharan 2 年之前
父節點
當前提交
d8fb5a819f
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      netbox/utilities/forms/fields/fields.py

+ 2 - 0
netbox/utilities/forms/fields/fields.py

@@ -93,6 +93,8 @@ class JSONField(_JSONField):
     """
     Custom wrapper around Django's built-in JSONField to avoid presenting "null" as the default text.
     """
+    empty_values = [None, '', ()]
+
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
         if not self.help_text: