fix: NameError in paddle_kombi/rapid_kombi cache update
The previous commit added `cached["word_result"]` but `cached` was not defined in these functions. Changed to safely check `_cache` dict first. Also includes sat_threshold fix (70→50) for green text. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user