Spaces:
CGIAR
/
Sleeping

LIANJie-Jason Claude Opus 4.6 commited on
Commit
39c2d11
·
1 Parent(s): c8cb83c

fix: prevent NameError when QU disabled and fix connection leak

Browse files

- Add route="vector" and sql_query=None defaults before the
`if qu_enabled:` block in both app_cli.py and app_web.py,
preventing NameError when query understanding is disabled.
- Wrap sqlite3 connection in try/finally in sql_retriever.py
to ensure conn.close() runs even if execute/fetchmany raises.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

3 files changed +11 -6
Files changed (3)
app_cli.py+2
app_web.py+2
src/sql_retriever.py+7-6