From 2df99de91da9815a2f4c2329ff7249b8a5e5df88 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 22 Sep 2025 16:25:02 +0800 Subject: [PATCH] fix: handle case where tool is None in tool activation check --- .../chat_pipeline/step/chat_step/impl/base_chat_step.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py b/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py index 05015f758..cd17d4a10 100644 --- a/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py +++ b/apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py @@ -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: