Fix alert_remote_access format

This commit is contained in:
Alfredo Cardigliano 2021-05-06 09:50:37 +02:00
parent 8d1edf226e
commit 52a483142b

View file

@ -35,7 +35,9 @@ end
-- #######################################################
function alert_remote_access.format(ifid, alert, alert_type_params)
local time = alert["tstamp_end"] - alert["tstamp"]
local now = os.time()
local tstamp_end = alert["tstamp_end"] or now
local time = tstamp_end - alert["tstamp"]
if time == 0 then
time = "< 1"