mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
fix: handle case where tool is None in tool activation check
This commit is contained in:
parent
6805d7605b
commit
2df99de91d
|
|
@ -257,7 +257,7 @@ class BaseChatStep(IChatStep):
|
|||
self.context['execute_ids'] = []
|
||||
for tool_id in tool_ids:
|
||||
tool = QuerySet(Tool).filter(id=tool_id).first()
|
||||
if not tool.is_active:
|
||||
if tool is None or tool.is_active is False:
|
||||
continue
|
||||
executor = ToolExecutor(CONFIG.get('SANDBOX'))
|
||||
if tool.init_params is not None:
|
||||
|
|
|
|||
Loading…
Reference in New Issue