Skip to content

Commit

Permalink
dev: Fix flag conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
KrishnaIyer committed Mar 13, 2024
1 parent 79b86ec commit 72d0a60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/source/firefly/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/source/ttnv2/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 72d0a60

Please sign in to comment.