diff --git a/pkg/source/firefly/config.go b/pkg/source/firefly/config.go index 9c51370..1f759f2 100644 --- a/pkg/source/firefly/config.go +++ b/pkg/source/firefly/config.go @@ -104,7 +104,7 @@ where the devices are exported but they are still valid on the firefly server func (c *Config) Initialize(src source.Config) error { c.src = src - if apiKey := os.Getenv("FIREFLY_API_KEY"); apiKey == "" && c.APIKey == "" { + if apiKey := os.Getenv("FIREFLY_API_KEY"); apiKey != "" && c.APIKey == "" { c.APIKey = apiKey } if c.appID == "" { diff --git a/pkg/source/ttnv2/config.go b/pkg/source/ttnv2/config.go index 9e5d6e9..33d6d93 100644 --- a/pkg/source/ttnv2/config.go +++ b/pkg/source/ttnv2/config.go @@ -114,7 +114,7 @@ func (c *Config) Initialize(rootConfig source.Config) error { if appAccessKey := os.Getenv("TTNV2_APP_ACCESS_KEY"); appAccessKey != "" && c.appAccessKey == "" { c.appAccessKey = appAccessKey } - if accountServerClientSecret := os.Getenv("TTNV2_ACCOUNT_SERVER_CLIENT_SECRET"); accountServerClientSecret != "" { + if accountServerClientSecret := os.Getenv("TTNV2_ACCOUNT_SERVER_CLIENT_SECRET"); accountServerClientSecret != "" && c.sdkConfig.AccountServerClientSecret == "" { c.sdkConfig.AccountServerClientSecret = accountServerClientSecret }