refresh task after clearing failure reasoning (#254)

This commit is contained in:
Shuchang Zheng
2024-05-04 14:21:00 -04:00
committed by GitHub
parent 6f4e896025
commit d7bca7153b

View File

@@ -332,6 +332,7 @@ class AgentDB:
).first(): ).first():
task.failure_reason = None task.failure_reason = None
await session.commit() await session.commit()
await session.refresh(task)
return convert_to_task(task, debug_enabled=self.debug_enabled) return convert_to_task(task, debug_enabled=self.debug_enabled)
else: else:
raise NotFoundError("Task not found") raise NotFoundError("Task not found")