feat(container-creation): call stopAndRename after pullImage (#2564)

* refactor(container): remove bind of function
pull/2594/head
Chaim Lev-Ari 2018-12-20 17:37:35 +02:00 committed by Anthony Lapenna
parent 6b05a35881
commit f2cd33e831
1 changed files with 2 additions and 2 deletions

View File

@ -659,7 +659,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
}
$scope.state.actionInProgress = true;
return pullImageIfNeeded()
.then(stopAndRenameContainer(oldContainer))
.then(stopAndRenameContainer)
.then(createNewContainer)
.then(applyResourceControl)
.then(connectToExtraNetworks)
@ -695,7 +695,7 @@ function ($q, $scope, $state, $timeout, $transition$, $filter, Container, Contai
}
}
function stopAndRenameContainer(oldContainer) {
function stopAndRenameContainer() {
if (!oldContainer) {
return $q.when();
}