Skip to content

Commit e92e8c9

Browse files
committed
check for empty task agent
1 parent d14d515 commit e92e8c9

File tree

1 file changed

+1
-1
lines changed
  • src/langtrace_python_sdk/instrumentation/crewai

1 file changed

+1
-1
lines changed

src/langtrace_python_sdk/instrumentation/crewai/patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def _parse_tasks(self, tasks):
223223
for task in tasks:
224224
self.crew["tasks"].append(
225225
{
226-
"agent": task.agent.role,
226+
"agent": task.agent.role if task.agent else None,
227227
"description": task.description,
228228
"async_execution": task.async_execution,
229229
"expected_output": task.expected_output,

0 commit comments

Comments
 (0)