fix(backend): expose c2_task.source in GET /c2/tasks response
Serialize source as t.source.value (string) in list_simulation_tasks. Updated test_c2_tasks_list shape assertion to include 'source' and assert value is 'mimic' for execute-created tasks. Added test in test_c2_import to assert source='import' in GET /c2/tasks after import. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -360,6 +360,7 @@ def list_simulation_tasks(sid: int):
|
||||
"status": t.status,
|
||||
"completed": t.completed,
|
||||
"output": t.output,
|
||||
"source": t.source.value,
|
||||
"mapping_applied": t.mapping_applied,
|
||||
"created_at": t.created_at.isoformat() if t.created_at else None,
|
||||
"completed_at": t.completed_at.isoformat() if t.completed_at else None,
|
||||
|
||||
Reference in New Issue
Block a user