Skip to content

Commit

Permalink
Avoid panic at null workflow in IW trigger, allowing it to refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgajard committed Nov 19, 2024
1 parent 60e86d7 commit 0fba1d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pagerduty/resource_pagerduty_incident_workflow_trigger.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ func fetchIncidentWorkflowTrigger(ctx context.Context, d *schema.ResourceData, m
func flattenIncidentWorkflowTrigger(d *schema.ResourceData, t *pagerduty.IncidentWorkflowTrigger) error {
d.SetId(t.ID)
d.Set("type", t.TriggerType.String())
d.Set("workflow", t.Workflow.ID)
if t.Workflow != nil {
d.Set("workflow", t.Workflow.ID)
}
d.Set("services", flattenIncidentWorkflowEnabledServices(t.Services))
d.Set("subscribed_to_all_services", t.SubscribedToAllServices)
if t.Condition != nil {
Expand Down

0 comments on commit 0fba1d2

Please sign in to comment.