feat: add check for inactive tool libraries
--bug=1058425 --user=刘瑞斌 【工具】应用中引用的工具被禁用后,对话时依然可以调用工具 https://www.tapd.cn/62980211/s/1728140
This commit is contained in:
parent
0bcf7e311c
commit
12feaac958
@ -112,6 +112,8 @@ def valid_function(tool_lib, workspace_id):
|
|||||||
tool_lib = get_authorized_tool(QuerySet(Tool).filter(id=tool_lib.id), workspace_id).first()
|
tool_lib = get_authorized_tool(QuerySet(Tool).filter(id=tool_lib.id), workspace_id).first()
|
||||||
if tool_lib is None:
|
if tool_lib is None:
|
||||||
raise Exception(_("Tool does not exist"))
|
raise Exception(_("Tool does not exist"))
|
||||||
|
if not tool_lib.is_active:
|
||||||
|
raise Exception(_("Tool is not active"))
|
||||||
|
|
||||||
|
|
||||||
class BaseToolLibNodeNode(IToolLibNode):
|
class BaseToolLibNodeNode(IToolLibNode):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user