Skip to content

Commit

Permalink
Fixes lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wbreza committed Sep 3, 2024
1 parent 3ee64ee commit 5ef8e52
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cli/azd/pkg/containerapps/container_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,20 @@ func (cas *containerAppService) persistSettings(
objConfig := config.NewConfig(obj)

if shouldPersistDomains {
customDomains, ok := aca.GetSlice(pathConfigurationIngressCustomDomains)
if ok {
objConfig.Set(pathConfigurationIngressCustomDomains, customDomains)
customDomains, has := aca.GetSlice(pathConfigurationIngressCustomDomains)
if has {
if err := objConfig.Set(pathConfigurationIngressCustomDomains, customDomains); err != nil {
return nil, fmt.Errorf("setting custom domains: %w", err)
}
}
}

if shouldPersistIngressSessionAffinity {
stickySessions, has := aca.Get(pathConfigurationIngressStickySessions)
if has {
objConfig.Set(pathConfigurationIngressStickySessions, stickySessions)
if err := objConfig.Set(pathConfigurationIngressStickySessions, stickySessions); err != nil {
return nil, fmt.Errorf("setting sticky sessions: %w", err)
}
}
}

Expand Down

0 comments on commit 5ef8e52

Please sign in to comment.