Skip to content

Commit cef9ec2

Browse files
oxzijulianbrost
authored andcommitted
Incident.RetriggerEscalations: incident_event entry
Unlike in Incident.ProcessEvent, Incident.RetriggerEscalations does not call Incident.AddEvent on the freshly synchronized Event. By adding this call, an entry to the incident_event table linking Event and Incident will be created. Closes #151.
1 parent 97e0114 commit cef9ec2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: internal/incident/incident.go

+4
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ func (i *Incident) RetriggerEscalations(ev *event.Event) {
229229
return err
230230
}
231231

232+
if err = i.AddEvent(ctx, tx, ev); err != nil {
233+
return fmt.Errorf("can't insert incident event to the database: %w", err)
234+
}
235+
232236
if err = i.triggerEscalations(ctx, tx, ev, types.Int{}, escalations); err != nil {
233237
return err
234238
}

0 commit comments

Comments
 (0)