From 0e97bc799bbd07794420a7d147ef59ff61f81d49 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:11:42 +0000 Subject: [PATCH] fix: fix syntax in base_agent_tools.py Co-Authored-By: Joe Moura --- src/crewai/tools/agent_tools/base_agent_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crewai/tools/agent_tools/base_agent_tools.py b/src/crewai/tools/agent_tools/base_agent_tools.py index 073c61836..85785dbe3 100644 --- a/src/crewai/tools/agent_tools/base_agent_tools.py +++ b/src/crewai/tools/agent_tools/base_agent_tools.py @@ -60,8 +60,8 @@ class BaseAgentTool(BaseTool): # Check if delegation is allowed based on allowed_agents list delegating_agent = [a for a in self.agents if a.id == self.agent_id][0] - if (delegating_agent.allowed_agents is not None and - agent[0].role not in delegating_agent.allowed_agents): + if (delegating_agent.allowed_agents is not None and + agent[0].role not in delegating_agent.allowed_agents): return self.i18n.errors("agent_tool_unauthorized_delegation").format( coworker=agent[0].role, allowed_agents="\n".join([f"- {role}" for role in delegating_agent.allowed_agents])