diff --git a/api/utils/serializer/v1/serializer.py b/api/utils/serializer/v1/serializer.py index 984038da..63c71827 100644 --- a/api/utils/serializer/v1/serializer.py +++ b/api/utils/serializer/v1/serializer.py @@ -63,6 +63,8 @@ class AbstractModelAPISerializerV1(AbstractModelAPISerializer): Returns: """ + if json_str is None or len(json_str) == 0: + return None code = KonovaCode.objects.get( atom_id=json_str, code_lists__in=[code_list_identifier]