Compare commits

...

1 Commits

Author SHA1 Message Date
oscarzhou
8e515a1dcd fix(stack): auto update not work when stack creator is removed 2024-04-12 10:26:48 +12:00

View File

@@ -90,7 +90,12 @@ func redeployWhenChanged(stack *portainer.Stack, deployer StackDeployer, datasto
Int("endpoint_id", int(stack.EndpointID)).
Msg("cannot auto update a stack, stack author user is missing")
return &StackAuthorMissingErr{int(stack.ID), author}
// 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}
}
}
if !isEnvironmentOnline(endpoint) {