Skip to content

Commit

Permalink
Allowing job_status being null if job hasn't been submitted
Browse files Browse the repository at this point in the history
  • Loading branch information
paulstretenowich committed Nov 29, 2023
1 parent 0f80cf8 commit 24319cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion project_tracking/db_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -1113,9 +1113,13 @@ def ingest_genpipes(project_id: str, ingest_data, session=None):
job_stop = datetime.strptime(job_json[vb.JOB_STOP], vb.DATE_LONG_FMT)
except TypeError:
job_stop = None
if job_json[vb.JOB_STATUS]:
job_status = StatusEnum(job_json[vb.JOB_STATUS])
else:
job_status = None
job = Job(
name=job_json[vb.JOB_NAME],
status=StatusEnum(job_json[vb.JOB_STATUS]),
status=job_status,
start=job_start,
stop=job_stop,
operation=operation
Expand Down

0 comments on commit 24319cb

Please sign in to comment.