1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Merge branch 'develop' into feature

This commit is contained in:
Jeremy Stretch
2024-05-01 16:09:14 -04:00
38 changed files with 794 additions and 574 deletions

View File

@ -1,4 +1,5 @@
import decimal
import json
import re
from datetime import datetime, date
@ -488,7 +489,7 @@ class CustomField(CloningMixin, ExportTemplatesMixin, ChangeLoggedModel):
# JSON
elif self.type == CustomFieldTypeChoices.TYPE_JSON:
field = JSONField(required=required, initial=initial)
field = JSONField(required=required, initial=json.dumps(initial) if initial else '')
# Object
elif self.type == CustomFieldTypeChoices.TYPE_OBJECT: