Skip to content

Commit

Permalink
Add omitempty on Service.SupportHours and Service.ScheduledActions
Browse files Browse the repository at this point in the history
The lack of `omitempty` on these fields is causing `CreateService` calls to fail
when both are omitted. This broke in the v1.4.0 release so this is a bug fix.

Relates to #348

Fixes #346
  • Loading branch information
theckman committed Aug 30, 2021
1 parent e23b94c commit 667895e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ type Service struct {
EscalationPolicy EscalationPolicy `json:"escalation_policy,omitempty"`
Teams []Team `json:"teams,omitempty"`
IncidentUrgencyRule *IncidentUrgencyRule `json:"incident_urgency_rule,omitempty"`
SupportHours *SupportHours `json:"support_hours"`
ScheduledActions []ScheduledAction `json:"scheduled_actions"`
SupportHours *SupportHours `json:"support_hours,omitempty"`
ScheduledActions []ScheduledAction `json:"scheduled_actions,omitempty"`
AlertCreation string `json:"alert_creation,omitempty"`
AlertGrouping string `json:"alert_grouping,omitempty"`
AlertGroupingTimeout *uint `json:"alert_grouping_timeout,omitempty"`
Expand Down

0 comments on commit 667895e

Please sign in to comment.