Revert "Alerting: remove spammy error"

This reverts commit 7ee84269a8df40c1484affa3347d743f0a773273.
This commit is contained in:
Sofia Papagiannaki 2020-09-23 14:13:54 +03:00
parent 5bbc572460
commit 4fdca3873c

View File

@ -139,8 +139,9 @@ func NewRuleFromDBAlert(ruleDef *models.Alert) (*Rule, error) {
jsonModel := simplejson.NewFromAny(v)
if id, err := jsonModel.Get("id").Int64(); err == nil {
uid, err := translateNotificationIDToUID(id, ruleDef.OrgId)
// err != nil in the most cases means that the notifier is obsolete
if err == nil {
if err != nil {
logger.Error("Unable to translate notification id to uid", "error", err.Error(), "dashboardId", model.DashboardID, "alertId", model.ID, "panelId", model.PanelID, "notificationId", id)
} else {
model.Notifications = append(model.Notifications, uid)
}
} else if uid, err := jsonModel.Get("uid").String(); err == nil {