Skip to content

Commit

Permalink
empty structs should not lead to wrong detection (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
linki authored Feb 19, 2024
1 parent 4200e91 commit 9e24210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/apis/zalando.org/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,12 @@ func (crs *ConfigurationResourcesSpec) GetName() string {

// IsConfigMap returns true if the ConfigurationResourcesSpec is a ConfigMap.
func (crs *ConfigurationResourcesSpec) IsConfigMap() bool {
return crs.ConfigMapRef != nil
return crs.ConfigMapRef != nil && crs.ConfigMapRef.Name != ""
}

// IsSecret returns true if the ConfigurationResourcesSpec is a Secret.
func (crs *ConfigurationResourcesSpec) IsSecret() bool {
return crs.SecretRef != nil
return crs.SecretRef != nil && crs.SecretRef.Name != ""
}

// StackSpecInternal is the spec part of the Stack, including `ingress` and
Expand Down

0 comments on commit 9e24210

Please sign in to comment.