Make filters optional in query template

This commit is contained in:
Alfredo Cardigliano 2023-07-21 15:10:44 +02:00
parent 29f885bb8e
commit a84995c125

View file

@ -453,7 +453,7 @@ if ntop.isEnterpriseL() then
-- Allow filters defined by the query only
defined_tags = {}
if #preset.filters.items > 0 then
if preset.filters and preset.filters.items and #preset.filters.items > 0 then
for _, item in ipairs(preset.filters.items) do
if not item.input or item.input ~= "fixed" then
local tag_key = item.name -- db_columns_to_tags[item.name]