mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 16:30:10 +00:00
Allow empty strings again and fix #983
This commit is contained in:
parent
7f48b1b4ad
commit
971e0e46af
2 changed files with 16 additions and 12 deletions
|
|
@ -75,18 +75,20 @@ end
|
|||
only_historical = false
|
||||
|
||||
local host_pool_id
|
||||
if (isAdministrator() and (_POST["pool"] ~= nil)) then
|
||||
host_pool_id = _POST["pool"]
|
||||
local prev_pool = tostring(host["host_pool_id"])
|
||||
if (host ~= nil) then
|
||||
if (isAdministrator() and (_POST["pool"] ~= nil)) then
|
||||
host_pool_id = _POST["pool"]
|
||||
local prev_pool = tostring(host["host_pool_id"])
|
||||
|
||||
if host_pool_id ~= prev_pool then
|
||||
local key = host2member(host["ip"], host["vlan"])
|
||||
host_pools_utils.deletePoolMember(ifId, prev_pool, key)
|
||||
host_pools_utils.addPoolMember(ifId, host_pool_id, key)
|
||||
interface.reloadHostPools()
|
||||
if host_pool_id ~= prev_pool then
|
||||
local key = host2member(host["ip"], host["vlan"])
|
||||
host_pools_utils.deletePoolMember(ifId, prev_pool, key)
|
||||
host_pools_utils.addPoolMember(ifId, host_pool_id, key)
|
||||
interface.reloadHostPools()
|
||||
end
|
||||
else
|
||||
host_pool_id = tostring(host["host_pool_id"])
|
||||
end
|
||||
else
|
||||
host_pool_id = tostring(host["host_pool_id"])
|
||||
end
|
||||
|
||||
if(host == nil) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue