Skip to content

Commit

Permalink
Merge pull request #119 from ailox/fix/uuid-loading
Browse files Browse the repository at this point in the history
FIX: Loading of UUIDs into intialized config
  • Loading branch information
leroxyl authored Feb 27, 2023
2 parents e729d43 + 6311a24 commit 8bc3ba8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,11 @@ func (c *Config) setDefaultURLs() error {
log.Debugf(" - Verification Service: %s", c.VerifyService)

if c.VerifyNiomonResponse {
if c.NiomonIdentity == nil {
// Load Niomon Identity, if not already set. It is required to check
// for the UUID attribute as well, since NiomonIdentity may not be
// nil if the configuration was loaded via `config.loadEnv()`
// instead of `config.loadFile()`.
if c.NiomonIdentity == nil || c.NiomonIdentity.UUID == uuid.Nil {
err := c.loadDefaultNiomonIdentity()
if err != nil {
return fmt.Errorf("couldn't load default niomon identity: %v", err)
Expand Down

0 comments on commit 8bc3ba8

Please sign in to comment.