Really fix the build status

This commit is contained in:
Joseph Schorr 2014-03-28 14:42:29 -04:00
parent 795de4235d
commit abfc38f10a

View file

@ -49,15 +49,17 @@ def trigger_view(trigger):
def build_status_view(build_obj, can_write=False):
phase = build_obj.phase
try:
status = build_logs.get_status(build_obj.uuid)
except BuildStatusRetrievalError:
status = None
status = {}
phase = 'cannot_load'
logger.debug('Can write: %s job_config: %s', can_write, build_obj.job_config)
resp = {
'id': build_obj.uuid,
'phase': build_obj.phase if status else 'cannot_load',
'phase': phase,
'started': format_date(build_obj.started),
'display_name': build_obj.display_name,
'status': status or {},