diff --git a/windows-agent/internal/config/config_source.go b/windows-agent/internal/config/config_source.go index 17225474f..940fdafa1 100644 --- a/windows-agent/internal/config/config_source.go +++ b/windows-agent/internal/config/config_source.go @@ -26,6 +26,10 @@ type subscription struct { } func (s subscription) resolve() (string, Source) { + if s.Organization != "" { + return s.Organization, SourceRegistry + } + if s.Store != "" { return s.Store, SourceMicrosoftStore } @@ -34,10 +38,6 @@ func (s subscription) resolve() (string, Source) { return s.User, SourceUser } - if s.Organization != "" { - return s.Organization, SourceRegistry - } - return "", SourceNone } @@ -50,13 +50,13 @@ type landscapeConf struct { } func (p landscapeConf) resolve() (string, Source) { - if p.UserConfig != "" { - return p.UserConfig, SourceUser - } - if p.OrgConfig != "" { return p.OrgConfig, SourceRegistry } + if p.UserConfig != "" { + return p.UserConfig, SourceUser + } + return "", SourceNone }