Check for errors when setting escalation_rule

This commit is contained in:
Alexander Hellbom 2016-10-17 20:36:40 +02:00
parent 3fae0454bf
commit 69fb733ad0
1 changed files with 4 additions and 1 deletions

View File

@ -118,7 +118,10 @@ func resourcePagerDutyEscalationPolicyRead(d *schema.ResourceData, meta interfac
d.Set("name", e.Name)
d.Set("description", e.Description)
d.Set("num_loops", e.NumLoops)
d.Set("escalation_rule", flattenRules(e.EscalationRules))
if err := d.Set("escalation_rule", flattenRules(e.EscalationRules)); err != nil {
return err
}
return nil
}