Fix build view when job_config is missing
This commit is contained in:
parent
56be893d7e
commit
3cd867b3ab
1 changed files with 4 additions and 3 deletions
|
@ -37,14 +37,15 @@ angular.module('quay').directive('repoPanelBuilds', function () {
|
|||
|
||||
var unordered = $scope.allBuilds.map(function(build_info) {
|
||||
var commit_sha = null;
|
||||
var job_config = build_info.job_config || {};
|
||||
|
||||
if (build_info.job_config.trigger_metadata) {
|
||||
commit_sha = build_info.job_config.trigger_metadata.commit_sha;
|
||||
if (job_config.trigger_metadata) {
|
||||
commit_sha = job_config.trigger_metadata.commit_sha;
|
||||
}
|
||||
|
||||
return $.extend(build_info, {
|
||||
'started_datetime': (new Date(build_info.started)).valueOf() * (-1),
|
||||
'building_tags': build_info.job_config.docker_tags,
|
||||
'building_tags': job_config.docker_tags || [],
|
||||
'commit_sha': commit_sha
|
||||
});
|
||||
});
|
||||
|
|
Reference in a new issue