fix: return 0 instead of None when checkpoint resumes from first task

This commit is contained in:
Greyson LaLonde
2026-04-04 22:37:42 +08:00
parent 0c228b45b7
commit e0fc32144c

View File

@@ -1304,7 +1304,7 @@ class Crew(FlowTrackable, BaseModel):
return None
for i, task in enumerate(tasks):
if task.output is None:
return i if i > 0 else None
return i
return len(tasks) if tasks else None
def _execute_tasks(