mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: handle empty terminology descriptions in chat
This commit is contained in:
@@ -793,7 +793,9 @@ def select_terminology_by_word(session: SessionDep, word: str, oid: int, datasou
|
||||
for row in t_list:
|
||||
pid = str(row.pid) if row.pid is not None else str(row.id)
|
||||
if _map.get(pid) is None:
|
||||
_map[pid] = {'words': [], 'description': row.description}
|
||||
_map[pid] = {'words': [], 'description': ''}
|
||||
if row.pid is None:
|
||||
_map[pid]['description'] = row.description
|
||||
_map[pid]['words'].append(row.word)
|
||||
|
||||
_results: list[dict] = []
|
||||
|
||||
Reference in New Issue
Block a user