Check for errors when setting schedule_layer

This commit is contained in:
Alexander Hellbom 2016-10-17 20:42:11 +02:00
parent 35312f0066
commit 0951adab3b
1 changed files with 4 additions and 1 deletions

View File

@ -145,7 +145,10 @@ func resourcePagerDutyScheduleRead(d *schema.ResourceData, meta interface{}) err
d.Set("name", s.Name)
d.Set("description", s.Description)
d.Set("schedule_layer", flattenLayers(s.ScheduleLayers))
if err := d.Set("schedule_layer", flattenLayers(s.ScheduleLayers)); err != nil {
return err
}
return nil
}