Skip to content

Commit

Permalink
api fix (#1086)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluder-Paradyne committed Aug 18, 2023
1 parent 303a65b commit 5227806
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superagi/models/toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down

0 comments on commit 5227806

Please sign in to comment.