Skip to content

Commit

Permalink
Fixes DEVTOOLING-674 by allowing the sanitizeMap function to continue…
Browse files Browse the repository at this point in the history
… processing as sanitizeE164Number and sanitizeRrule functions could return empty strings. If they do, we want to filter them out (further down the sanitizeMap function) unless they are explicitly marked to be kept by the AllowForZeroValues config to be set (#1128)
  • Loading branch information
bbbco authored Jul 1, 2024
1 parent 23ffa1d commit 9da5440
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions genesyscloud/tfexporter/genesyscloud_resource_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -1231,19 +1231,17 @@ func (g *GenesysCloudResourceExporter) sanitizeConfigMap(
}

if exporter.IsAttributeE164(currAttr) {
if phoneNumber, ok := configMap[key].(string); !ok || phoneNumber == "" {
if _, ok := configMap[key].(string); !ok {
continue
}
configMap[key] = sanitizeE164Number(configMap[key].(string))
continue
}

if exporter.IsAttributeRrule(currAttr) {
if rrule, ok := configMap[key].(string); !ok || rrule == "" {
if _, ok := configMap[key].(string); !ok {
continue
}
configMap[key] = sanitizeRrule(configMap[key].(string))
continue
}

switch val.(type) {
Expand Down

0 comments on commit 9da5440

Please sign in to comment.