Really fix the build status
This commit is contained in:
parent
795de4235d
commit
abfc38f10a
1 changed files with 4 additions and 2 deletions
|
@ -49,15 +49,17 @@ def trigger_view(trigger):
|
||||||
|
|
||||||
|
|
||||||
def build_status_view(build_obj, can_write=False):
|
def build_status_view(build_obj, can_write=False):
|
||||||
|
phase = build_obj.phase
|
||||||
try:
|
try:
|
||||||
status = build_logs.get_status(build_obj.uuid)
|
status = build_logs.get_status(build_obj.uuid)
|
||||||
except BuildStatusRetrievalError:
|
except BuildStatusRetrievalError:
|
||||||
status = None
|
status = {}
|
||||||
|
phase = 'cannot_load'
|
||||||
|
|
||||||
logger.debug('Can write: %s job_config: %s', can_write, build_obj.job_config)
|
logger.debug('Can write: %s job_config: %s', can_write, build_obj.job_config)
|
||||||
resp = {
|
resp = {
|
||||||
'id': build_obj.uuid,
|
'id': build_obj.uuid,
|
||||||
'phase': build_obj.phase if status else 'cannot_load',
|
'phase': phase,
|
||||||
'started': format_date(build_obj.started),
|
'started': format_date(build_obj.started),
|
||||||
'display_name': build_obj.display_name,
|
'display_name': build_obj.display_name,
|
||||||
'status': status or {},
|
'status': status or {},
|
||||||
|
|
Reference in a new issue