mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 02:48:38 -06:00
Change JSONField, prepare_value to output str with enclosing " (#18846)
This commit is contained in:
parent
4fd572ef2f
commit
30ba10dce8
@ -111,7 +111,7 @@ class JSONField(_JSONField):
|
||||
try:
|
||||
value = json.loads(value, cls=self.decoder)
|
||||
except json.decoder.JSONDecodeError:
|
||||
return value
|
||||
return f'"{value}"'
|
||||
return json.dumps(value, sort_keys=True, indent=4, ensure_ascii=False, cls=self.encoder)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user