mirror of
https://github.com/portainer/portainer.git
synced 2025-08-09 07:45:22 +02:00
fix(stack): auto update not work when stack creator is removed
This commit is contained in:
parent
498ba46863
commit
acb9a2fee0
1 changed files with 6 additions and 1 deletions
|
@ -90,8 +90,13 @@ func redeployWhenChanged(stack *portainer.Stack, deployer StackDeployer, datasto
|
||||||
Int("endpoint_id", int(stack.EndpointID)).
|
Int("endpoint_id", int(stack.EndpointID)).
|
||||||
Msg("cannot auto update a stack, stack author user is missing")
|
Msg("cannot auto update a stack, stack author user is missing")
|
||||||
|
|
||||||
|
// If the stack creator is deleted, the stack should still remain capable of
|
||||||
|
// updating automatically.
|
||||||
|
if !datastore.IsErrObjectNotFound(err) {
|
||||||
|
// only return error when it's not ErrObjectNotFound
|
||||||
return &StackAuthorMissingErr{int(stack.ID), author}
|
return &StackAuthorMissingErr{int(stack.ID), author}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if !isEnvironmentOnline(endpoint) {
|
if !isEnvironmentOnline(endpoint) {
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue