From 91bfa9a5d39859efb77dea4bbfa3261d3d6a1a03 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 27 Sep 2023 12:37:12 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(utils.py):=20add=20error=20h?= =?UTF-8?q?andling=20for=20flow=20not=20found=20in=20cache=20when=20updati?= =?UTF-8?q?ng=20build=20status?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/services/cache/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/langflow/services/cache/utils.py b/src/backend/langflow/services/cache/utils.py index a708c6e7e..bd6b4fb0a 100644 --- a/src/backend/langflow/services/cache/utils.py +++ b/src/backend/langflow/services/cache/utils.py @@ -207,5 +207,7 @@ def save_uploaded_file(file: UploadFile, folder_name): def update_build_status(cache_service, flow_id: str, status: BuildStatus): cached_flow = cache_service[flow_id] + if cached_flow is None: + raise ValueError(f"Flow {flow_id} not found in cache") cached_flow["status"] = status cache_service[flow_id] = cached_flow