1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-21 22:39:41 +02:00

fix(gitops): change the condition that checks if the environment is online EE-6321 (#10665)

This commit is contained in:
andres-portainer 2023-11-23 11:54:50 -03:00 committed by GitHub
parent 26953d0b15
commit a4b17d2548
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,6 @@ import (
"github.com/portainer/portainer/api/dataservices"
"github.com/portainer/portainer/api/git/update"
"github.com/portainer/portainer/api/http/security"
"github.com/portainer/portainer/api/internal/endpointutils"
"github.com/portainer/portainer/api/scheduler"
"github.com/portainer/portainer/api/stacks/stackutils"
@ -172,7 +171,8 @@ func getUserRegistries(datastore dataservices.DataStore, user *portainer.User, e
}
func isEnvironmentOnline(endpoint *portainer.Endpoint) bool {
if endpointutils.IsLocalEndpoint(endpoint) {
if endpoint.Type != portainer.AgentOnDockerEnvironment &&
endpoint.Type != portainer.AgentOnKubernetesEnvironment {
return true
}