Fixes blacklist count for #8078

This commit is contained in:
Luca Deri 2023-12-07 17:36:25 +01:00
parent f52ba41602
commit 3fc883df5b
7 changed files with 30 additions and 20 deletions

View file

@ -71,13 +71,12 @@ function ts_dump.blacklist_update(when, verbose)
local lists = lists_utils.getCategoryLists()
for list_name, v in pairs(lists) do
if v.status.num_hits > 0 then
if(v.status.num_hits.total > 0) then
list_name = list_name:gsub("%s+", "_") -- replace space with underscore
ts_utils.append("blacklist:hits", {
ifid = getSystemInterfaceId(),
blacklist_name = list_name,
hits = v.status.num_hits
hits = v.status.num_hits.total
}, when)
end
end