Return only standalone tasks, no workflow tasks in /runs (#1716)
This commit is contained in:
@@ -1409,7 +1409,11 @@ class AgentDB:
|
||||
convert_to_workflow_run(run, debug_enabled=self.debug_enabled) for run in workflow_run_query_result
|
||||
]
|
||||
|
||||
task_query = select(TaskModel).filter(TaskModel.organization_id == organization_id)
|
||||
task_query = (
|
||||
select(TaskModel)
|
||||
.filter(TaskModel.organization_id == organization_id)
|
||||
.filter(TaskModel.workflow_run_id.is_(None))
|
||||
)
|
||||
if status:
|
||||
task_query = task_query.filter(TaskModel.status.in_(status))
|
||||
task_query = task_query.order_by(TaskModel.created_at.desc()).limit(limit)
|
||||
|
||||
Reference in New Issue
Block a user