Alerting: remove spammy error

This commit is contained in:
Sofia Papagiannaki 2020-09-23 14:10:47 +03:00
parent e16637793d
commit 5bbc572460

View File

@ -139,9 +139,8 @@ 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)
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 {
// err != nil in the most cases means that the notifier is obsolete
if err == nil {
model.Notifications = append(model.Notifications, uid)
}
} else if uid, err := jsonModel.Get("uid").String(); err == nil {