Skip to content

Commit 12feaac

Browse files
committed
feat: add check for inactive tool libraries
--bug=1058425 --user=刘瑞斌 【工具】应用中引用的工具被禁用后,对话时依然可以调用工具 https://www.tapd.cn/62980211/s/1728140
1 parent 0bcf7e3 commit 12feaac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/application/flow/step_node/tool_lib_node/impl/base_tool_lib_node.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ def valid_function(tool_lib, workspace_id):
112112
tool_lib = get_authorized_tool(QuerySet(Tool).filter(id=tool_lib.id), workspace_id).first()
113113
if tool_lib is None:
114114
raise Exception(_("Tool does not exist"))
115+
if not tool_lib.is_active:
116+
raise Exception(_("Tool is not active"))
115117

116118

117119
class BaseToolLibNodeNode(IToolLibNode):

0 commit comments

Comments
 (0)