HOTFIX: API

* hardens atom_id input to be integer or string compatible
This commit is contained in:
mpeltriaux 2022-04-25 13:47:07 +02:00
parent 989d256521
commit 339f074681

View File

@ -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,