diff --git a/app/portainer/views/stacks/edit/stackController.js b/app/portainer/views/stacks/edit/stackController.js index d0719d086..948e43a0e 100644 --- a/app/portainer/views/stacks/edit/stackController.js +++ b/app/portainer/views/stacks/edit/stackController.js @@ -486,6 +486,8 @@ angular.module('portainer.app').controller('StackController', [ const orphanedRunning = $transition$.params().orphanedRunning == 'true'; $scope.orphanedRunning = orphanedRunning; + $scope.stackType = parseInt($transition$.params().type, 10); + if (external || (orphaned && orphanedRunning)) { loadExternalStack(stackName); } @@ -496,10 +498,6 @@ angular.module('portainer.app').controller('StackController', [ } $scope.composeSyntaxMaxVersion = endpoint.ComposeSyntaxMaxVersion; - - $scope.stackType = parseInt($transition$.params().type, 10); - - $scope.editorReadOnly = !Authentication.hasAuthorizations(['PortainerStackUpdate']); } initView();