Added traceback in case of nil score

This commit is contained in:
MatteoBiscosi 2022-07-20 13:14:49 +02:00
parent 3db8cc6cc8
commit 3f214341ea
18 changed files with 31 additions and 19 deletions

View file

@ -104,7 +104,7 @@ function slack.dequeueRecipientAlerts(recipient, budget)
for _, json_message in ipairs(notifications) do
local notif = json.decode(json_message)
notif.severity = ntop.mapScoreToSeverity(notif.score)
notif.severity = map_score_to_severity(notif.score)
if notif.entity_id then
if not alerts_by_types[notif.entity_id] then
alerts_by_types[notif.entity_id] = {}