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

Merge develop into develop-2.10

This commit is contained in:
Jeremy Stretch
2020-09-04 16:09:05 -04:00
parent ec66e1a5c0
commit 08c492f1f4
46 changed files with 464 additions and 117 deletions

View File

@ -158,7 +158,7 @@ class CustomFieldModelSerializer(ValidatedModelSerializer):
instance.custom_fields = {}
for field in custom_fields:
value = instance.cf.get(field.name)
if field.type == CustomFieldTypeChoices.TYPE_SELECT and value is not None:
if field.type == CustomFieldTypeChoices.TYPE_SELECT and value:
instance.custom_fields[field.name] = CustomFieldChoiceSerializer(value).data
else:
instance.custom_fields[field.name] = value