|
@@ -117,7 +117,7 @@ def get_job_task_log(job_id: str, af_run_id: str, task_id: str, db: Session = De
|
|
|
res = get_task_log(job_id, af_run_id, task_id)
|
|
|
log = res['data'] if 'data' in res else None
|
|
|
if log:
|
|
|
- log['status'] = RUN_STATUS[log['status']]
|
|
|
+ log['status'] = RUN_STATUS[log['status']] if log['status'] else 0
|
|
|
return log
|
|
|
|
|
|
@router.get("/logs_status/{ids}", dependencies=[Depends(verify_all)])
|
|
@@ -129,4 +129,4 @@ def get_job_log_status(ids: str):
|
|
|
for run_id in run_ids:
|
|
|
res = get_job_run_status(run_id)
|
|
|
id_to_status.update({run_id:RUN_STATUS[res['data']['status']]})
|
|
|
- return id_to_status
|
|
|
+ return id_to_status
|