cleanup alert_notification_state when deleting alert rules and channels

This commit is contained in:
Marcus Efraimsson
2018-09-30 21:57:15 +02:00
parent 5ec086dc56
commit 1be8fb76b8
2 changed files with 13 additions and 2 deletions
+4
View File
@@ -60,6 +60,10 @@ func deleteAlertByIdInternal(alertId int64, reason string, sess *DBSession) erro
return err
}
if _, err := sess.Exec("DELETE FROM alert_notification_state WHERE alert_id = ?", alertId); err != nil {
return err
}
return nil
}