From 5227806f7cbb273f9a8c7852381da7bd4512781c Mon Sep 17 00:00:00 2001 From: Fluder-Paradyne <121793617+Fluder-Paradyne@users.noreply.github.com> Date: Fri, 18 Aug 2023 19:54:25 +0530 Subject: [PATCH] api fix (#1086) --- superagi/models/toolkit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superagi/models/toolkit.py b/superagi/models/toolkit.py index 9246111a1..1707d9810 100644 --- a/superagi/models/toolkit.py +++ b/superagi/models/toolkit.py @@ -151,7 +151,8 @@ def get_tool_and_toolkit_arr(cls, session, organisation_id :int,agent_config_too toolkits_arr.add(toolkit.id) if tool_obj.get("tools"): for tool_name_str in tool_obj["tools"]: - tool_db_obj=session.query(Tool).filter(Tool.name == tool_name_str.strip()).first() + tool_db_obj = session.query(Tool).filter(Tool.name == tool_name_str.strip(), + Tool.toolkit_id == toolkit.id).first() if tool_db_obj is None: raise Exception("One or more of the Tool(s)/Toolkit(s) does not exist.")