fix: handle case where tool is None in tool activation check
parent
6805d7605b
commit
2df99de91d
|
|
@ -257,7 +257,7 @@ class BaseChatStep(IChatStep):
|
||||||
self.context['execute_ids'] = []
|
self.context['execute_ids'] = []
|
||||||
for tool_id in tool_ids:
|
for tool_id in tool_ids:
|
||||||
tool = QuerySet(Tool).filter(id=tool_id).first()
|
tool = QuerySet(Tool).filter(id=tool_id).first()
|
||||||
if not tool.is_active:
|
if tool is None or tool.is_active is False:
|
||||||
continue
|
continue
|
||||||
executor = ToolExecutor(CONFIG.get('SANDBOX'))
|
executor = ToolExecutor(CONFIG.get('SANDBOX'))
|
||||||
if tool.init_params is not None:
|
if tool.init_params is not None:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue