Skip to content

Commit 2df99de

Browse files
committed
fix: handle case where tool is None in tool activation check
1 parent 6805d76 commit 2df99de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/application/chat_pipeline/step/chat_step/impl/base_chat_step.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def _handle_mcp_request(self, mcp_enable, tool_enable, mcp_source, mcp_servers,
257257
self.context['execute_ids'] = []
258258
for tool_id in tool_ids:
259259
tool = QuerySet(Tool).filter(id=tool_id).first()
260-
if not tool.is_active:
260+
if tool is None or tool.is_active is False:
261261
continue
262262
executor = ToolExecutor(CONFIG.get('SANDBOX'))
263263
if tool.init_params is not None:

0 commit comments

Comments
 (0)