Fix list index out of range during conditional task usage

This commit is contained in:
Alessandro Romano
2025-01-20 12:02:01 +01:00
parent 3e4f112f39
commit ff85f0d12e

View File

@@ -783,7 +783,7 @@ class Crew(BaseModel):
task_outputs = self._process_async_tasks(futures, was_replayed)
futures.clear()
previous_output = task_outputs[task_index - 1] if task_outputs else None
previous_output = task_outputs[0] if task_outputs else None
if previous_output is not None and not task.should_execute(previous_output):
self._logger.log(
"debug",