Fix the status view when it cannot be loaded
This commit is contained in:
parent
99cdc0402a
commit
4a66bd4af2
1 changed files with 2 additions and 5 deletions
|
@ -1160,15 +1160,12 @@ def get_job_config(build_obj):
|
|||
|
||||
def build_status_view(build_obj, can_write=False):
|
||||
status = build_logs.get_status(build_obj.uuid)
|
||||
if not status:
|
||||
status = 'cannot_load'
|
||||
|
||||
return {
|
||||
'id': build_obj.uuid,
|
||||
'phase': build_obj.phase,
|
||||
'phase': build_obj.phase if status else 'cannot_load',
|
||||
'started': build_obj.started,
|
||||
'display_name': build_obj.display_name,
|
||||
'status': status,
|
||||
'status': status or {},
|
||||
'job_config': get_job_config(build_obj) if can_write else None,
|
||||
'is_writer': can_write,
|
||||
'trigger': trigger_view(build_obj.trigger),
|
||||
|
|
Reference in a new issue