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

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