Fixes alert score not correctlt working (#8851)

This commit is contained in:
Matteo Biscosi 2024-12-11 19:25:11 +01:00
parent e3487d445f
commit faa34b614c
41 changed files with 41 additions and 31 deletions

View file

@ -781,7 +781,7 @@ function alert_utils.format_other_alerts(alert_bitmap, predominant_alert, alert_
local other_alerts_by_score = {} -- Table used to keep messages ordered by score
local additional_alerts = {}
-- This is for old data, so keep it like this
if not (alert_json) and (alert_json.alerts) then
if not (alert_json) or (aler_json and not alert_json.alerts) then
-- Unpack all flow alerts, iterating the alerts_map. The alerts_map is stored as an HEX.
local nibble_num = 0 -- Current nibble being processed
for alerts_map_nibble_id = #alert_bitmap, 1, -1 do