Skip to content

Commit

Permalink
added nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
kavinbalagen committed Sep 12, 2024
1 parent f06a2f3 commit f962a73
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,12 @@ func buildSdkWhatsAppId(d *schema.ResourceData, key string) *platformclientv2.Wh

// flattenSdkWhatsAppId maps a Genesys Cloud platformclientv2.Whatsappid to a []interface{}
func flattenSdkWhatsAppId(whatsappId *platformclientv2.Whatsappid) []interface{} {
if whatsappId.DisplayName == nil {
return nil
}
if whatsappId.PhoneNumber == nil {
return nil
}
whatsappInterface := make(map[string]interface{})
flattenPhonenumber := flattenPhoneNumber(whatsappId.PhoneNumber)
whatsappInterface["display_name"] = *whatsappId.DisplayName
Expand Down

0 comments on commit f962a73

Please sign in to comment.