Fixes attempt to index a nil value with Syslog alerts

This commit is contained in:
Simone Mainardi 2019-07-16 13:05:27 +02:00
parent 17616c5f66
commit 883b99dce9

View file

@ -647,12 +647,7 @@ function alertLevel(v)
end
function alertLevelToSyslogLevel(v)
local leveltable = {}
for i, t in ipairs(alert_consts.alert_severity_keys) do
leveltable[#leveltable + 1] = {t[4], t[3]}
end
return(_handleArray(leveltable, v))
return alert_consts.alert_severities[v]
end
function areAlertsEnabled()