Lower level of notification translation messages

This commit is contained in:
Sofia Papagiannaki 2020-09-23 14:25:43 +03:00
parent 4fdca3873c
commit 5c7aad3009

View File

@ -140,7 +140,7 @@ func NewRuleFromDBAlert(ruleDef *models.Alert) (*Rule, error) {
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)
logger.Debug("Unable to translate notification id to uid", "error", err.Error(), "dashboardId", model.DashboardID, "alertId", model.ID, "panelId", model.PanelID)
} else {
model.Notifications = append(model.Notifications, uid)
}
@ -176,7 +176,6 @@ func NewRuleFromDBAlert(ruleDef *models.Alert) (*Rule, error) {
func translateNotificationIDToUID(id int64, orgID int64) (string, error) {
notificationUID, err := getAlertNotificationUIDByIDAndOrgID(id, orgID)
if err != nil {
logger.Debug("Failed to translate Notification Id to Uid", "orgID", orgID, "Id", id)
return "", err
}