Skip to content

Commit

Permalink
fix: Do a nil check for repeat option in escalation data source
Browse files Browse the repository at this point in the history
  • Loading branch information
nickstamat committed Aug 8, 2024
1 parent 09d062c commit 110f44e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion opsgenie/data_source_opsgenie_escalation.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ func dataSourceOpsgenieEscalationRead(d *schema.ResourceData, meta interface{})
d.Set("name", getResponse.Name)
d.Set("description", getResponse.Description)
d.Set("rules", flattenOpsgenieEscalationRules(getResponse.Rules))
d.Set("repeat", flattenOpsgenieEscalationRepeat(getResponse.Repeat))
if getResponse.Repeat != nil {
d.Set("repeat", flattenOpsgenieEscalationRepeat(getResponse.Repeat))
}
if getResponse.OwnerTeam != nil {
d.Set("owner_team_id", getResponse.OwnerTeam.Id)
}
Expand Down

0 comments on commit 110f44e

Please sign in to comment.