1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

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

* refactor(container): remove bind of function
This commit is contained in:
Chaim Lev-Ari 2018-12-20 17:37:35 +02:00 committed by Anthony Lapenna
parent 6b05a35881
commit f2cd33e831

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();
}