fix: define msg_id and agent_reply before async block to prevent UnboundLocalError
This commit is contained in:
parent
73935ae652
commit
a117d2ffd7
@ -288,6 +288,8 @@ if action == 'send_message':
|
||||
|
||||
uid = await get_user()
|
||||
org_id = await get_userorgid() or '0'
|
||||
msg_id = '' # always defined, even on error
|
||||
agent_reply = ''
|
||||
|
||||
async with DBPools().sqlorContext(dbname) as sor:
|
||||
# 1. Load context and model
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user