VLAN dropdown filter fix. (#7673)

This commit is contained in:
Nicolo Maio 2023-08-08 10:17:56 +02:00
parent 00a980259c
commit 9845b1fcae

View file

@ -105,14 +105,18 @@ table.insert(formatted_vlan_filters, 1, {
label = i18n('all'),
value = ""
})
local rsp = {
{
action = "vlan_id",
label = i18n("vlan"),
tooltip = i18n("vlan_filter"),
name = "vlan_filter",
value = formatted_vlan_filters
local rsp = {}
if (#formatted_vlan_filters > 2) then
rsp = {
{
action = "vlan_id",
label = i18n("vlan"),
tooltip = i18n("vlan_filter"),
name = "vlan_filter",
value = formatted_vlan_filters
}
}
}
end
rest_utils.answer(rest_utils.consts.success.ok, rsp)