Skip to content

Commit

Permalink
Fix handling of nil notify_by list (#2046)
Browse files Browse the repository at this point in the history
Backend can reset it to null when editing a dasboard.

Closes #2045
  • Loading branch information
therve authored Aug 7, 2023
1 parent 1968d67 commit dc1060c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions datadog/resource_datadog_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,10 @@ func buildDatadogNotifyList(terraformNotifyList *schema.Set) *[]string {
}

func buildTerraformNotifyList(datadogNotifyList *[]string) *[]string {
if datadogNotifyList == nil {
terraformNotifyList := make([]string, 0)
return &terraformNotifyList
}
terraformNotifyList := make([]string, len(*datadogNotifyList))
for i, authorHandle := range *datadogNotifyList {
terraformNotifyList[i] = authorHandle
Expand Down

0 comments on commit dc1060c

Please sign in to comment.