diff --git a/klausur-service/backend/ocr_pipeline_api.py b/klausur-service/backend/ocr_pipeline_api.py index a079ee1..0a18d9b 100644 --- a/klausur-service/backend/ocr_pipeline_api.py +++ b/klausur-service/backend/ocr_pipeline_api.py @@ -3537,7 +3537,9 @@ async def paddle_kombi(session_id: str): cropped_png=img_png, current_step=8, ) - cached["word_result"] = word_result + # Update in-memory cache so detect-structure can access word_result + if session_id in _cache: + _cache[session_id]["word_result"] = word_result logger.info( "paddle_kombi session %s: %d cells (%d rows, %d cols) in %.2fs " @@ -3674,7 +3676,9 @@ async def rapid_kombi(session_id: str): cropped_png=img_png, current_step=8, ) - cached["word_result"] = word_result + # Update in-memory cache so detect-structure can access word_result + if session_id in _cache: + _cache[session_id]["word_result"] = word_result logger.info( "rapid_kombi session %s: %d cells (%d rows, %d cols) in %.2fs "