fix(container-creation): ignore error when pulling an image (#914)

pull/884/merge
Anthony Lapenna 2017-06-05 07:55:18 +02:00 committed by GitHub
parent 1c4ccfe294
commit d5f00597a5
1 changed files with 17 additions and 17 deletions

View File

@ -299,10 +299,9 @@ function ($q, $scope, $state, $stateParams, $filter, Info, Container, ContainerH
}; };
function createContainer(config, accessControlData) { function createContainer(config, accessControlData) {
$q.when($scope.formValues.alwaysPull ? ImageService.pullImage($scope.config.Image, $scope.formValues.Registry) : null) $q.when(!$scope.formValues.alwaysPull || ImageService.pullImage($scope.config.Image, $scope.formValues.Registry))
.then(function success() { .finally(function final() {
return ContainerService.createAndStartContainer(config); ContainerService.createAndStartContainer(config)
})
.then(function success(data) { .then(function success(data) {
var containerIdentifier = data.Id; var containerIdentifier = data.Id;
var userId = Authentication.getUserDetails().ID; var userId = Authentication.getUserDetails().ID;
@ -318,6 +317,7 @@ function ($q, $scope, $state, $stateParams, $filter, Info, Container, ContainerH
.finally(function final() { .finally(function final() {
$('#createContainerSpinner').hide(); $('#createContainerSpinner').hide();
}); });
});
} }
initView(); initView();