diff --git a/api/utils/serializer/v1/serializer.py b/api/utils/serializer/v1/serializer.py index 23d1f692..9d3b9dfb 100644 --- a/api/utils/serializer/v1/serializer.py +++ b/api/utils/serializer/v1/serializer.py @@ -75,7 +75,10 @@ class AbstractModelAPISerializerV1(AbstractModelAPISerializer): Returns: """ - if json_str is None or len(json_str) == 0: + if json_str is None: + return None + json_str = str(json_str) + if len(json_str) == 0: return None code = KonovaCode.objects.get( atom_id=json_str,