From adc2c93682299e965e5fcdde2e0f76eda4d3daec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markku=20Leini=C3=B6?= Date: Thu, 18 Apr 2024 22:54:14 +0300 Subject: [PATCH] Compare identity instead of equality --- netbox/core/forms/model_forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/core/forms/model_forms.py b/netbox/core/forms/model_forms.py index b8e2c2794..0f4f971dc 100644 --- a/netbox/core/forms/model_forms.py +++ b/netbox/core/forms/model_forms.py @@ -133,7 +133,7 @@ class ConfigFormMetaclass(forms.models.ModelFormMetaclass): 'help_text': param.description, } field_kwargs.update(**param.field_kwargs) - if param.field == _JSONField: + if param.field is _JSONField: # Replace with our own JSONField to get pretty JSON in config editor param.field = JSONField param_fields[param.name] = param.field(**field_kwargs)