mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-18 21:16:27 -06:00
Change JSONField, prepare_value to output str with enclosing " (#18846)
This commit is contained in:
parent
5e22ef59c5
commit
749a83d742
@ -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