Parcourir la source

Fixes #702: Improved Unicode support for custom fields

Jeremy Stretch il y a 8 ans
Parent
commit
8bff8bcbe2
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      netbox/extras/models.py

+ 1 - 1
netbox/extras/models.py

@@ -130,7 +130,7 @@ class CustomField(models.Model):
         if self.type == CF_TYPE_SELECT:
             # Could be ModelChoiceField or TypedChoiceField
             return str(value.id) if hasattr(value, 'id') else str(value)
-        return str(value)
+        return value
 
     def deserialize_value(self, serialized_value):
         """