Skip to content

Commit

Permalink
add type check
Browse files Browse the repository at this point in the history
  • Loading branch information
myc2h6o committed Aug 7, 2023
1 parent ca3401f commit 557e0ad
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,10 @@ func flattenManagedApplicationParameters(input *interface{}, localParameters map
// Secure values are not returned, thus settings it with local value
v = ""
if oldValueStruct, oldValueStructOK := localParameters[k]; oldValueStructOK {
if oldValue, oldValueOK := oldValueStruct.(map[string]interface{})["value"]; oldValueOK {
v = oldValue
if _, oldValueStructTypeOK := oldValueStruct.(map[string]interface{}); oldValueStructTypeOK {
if oldValue, oldValueOK := oldValueStruct.(map[string]interface{})["value"]; oldValueOK {
v = oldValue
}
}
}
}
Expand Down Expand Up @@ -464,8 +466,10 @@ func flattenManagedApplicationParameterValuesValueToString(input *interface{}, l
if _, ok := value["value"]; !ok {
value["value"] = ""
if localParam, localParamOK := localParameters[k]; localParamOK {
if localParamValue, localParamValueOK := localParam.(map[string]interface{})["value"]; localParamValueOK {
value["value"] = localParamValue
if _, oldValueStructTypeOK := localParam.(map[string]interface{}); oldValueStructTypeOK {
if localParamValue, localParamValueOK := localParam.(map[string]interface{})["value"]; localParamValueOK {
value["value"] = localParamValue
}
}
}
}
Expand Down

0 comments on commit 557e0ad

Please sign in to comment.