From 1abcf8e3f139a807d191aa1e9ffc0f337fc27025 Mon Sep 17 00:00:00 2001 From: Prince Mahar Date: Fri, 24 Apr 2026 00:39:31 +0530 Subject: [PATCH] Fix crash when 'resultTime' is missing in components --- api/app/v1/endpoints/create/bulk_observation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/v1/endpoints/create/bulk_observation.py b/api/app/v1/endpoints/create/bulk_observation.py index 0f7e3d0..fa6e719 100644 --- a/api/app/v1/endpoints/create/bulk_observation.py +++ b/api/app/v1/endpoints/create/bulk_observation.py @@ -210,7 +210,7 @@ async def insertBulkObservation( if components: result_idx = components.index("result") ph_idx = components.index("phenomenonTime") - if components.index("resultTime") > -1: + if "resultTime" in components: result_time_idx = components.index("resultTime") if isinstance(payload[0][result_idx], str): result_type = 3