fix: handle case where tool is None in tool activation check

This commit is contained in:
CaptainB 2025-09-22 16:25:02 +08:00
parent 6805d7605b
commit 2df99de91d

View File

@ -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: