Преглед изворни кода

Force custom field values to strings for object change serialization

Jeremy Stretch пре 7 година
родитељ
комит
bd2219276f
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      netbox/utilities/utils.py

+ 1 - 1
netbox/utilities/utils.py

@@ -97,7 +97,7 @@ def serialize_object(obj, extra=None):
     # Include any custom fields
     if hasattr(obj, 'get_custom_fields'):
         data['custom_fields'] = {
-            field.name: value for field, value in obj.get_custom_fields().items()
+            field.name: str(value) for field, value in obj.get_custom_fields().items()
         }
 
     # Include any tags