mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Fixes indexing of a nil table (#8879)
This commit is contained in:
parent
fd98333e2c
commit
8f30dbe7df
1 changed files with 3 additions and 3 deletions
|
|
@ -61,14 +61,14 @@ local vlans_stats = interface.getVLANsInfo(sortColumn, perPage, to_skip, sOrder,
|
|||
|
||||
local total_rows = 0
|
||||
|
||||
if(vlans_stats ~= nil) then
|
||||
if(vlans_stats) then
|
||||
total_rows = vlans_stats["numVLANs"]
|
||||
vlans_stats = vlans_stats["VLANs"]
|
||||
end
|
||||
vlans_stats = vlans_stats["VLANs"]
|
||||
|
||||
local res_formatted = {}
|
||||
|
||||
for _, vlan in ipairs(vlans_stats) do
|
||||
for _, vlan in pairs(vlans_stats or {}) do
|
||||
local record = vlan2record(interface.getId(), vlan)
|
||||
res_formatted[#res_formatted + 1] = record
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue