libs/core: fix removal of wifi networks without interface attached (OpenWrt #10400)
This commit is contained in:
parent
e50dea1cf7
commit
cfe48c17d3
1 changed files with 3 additions and 2 deletions
|
@ -1411,8 +1411,9 @@ function wifinet.adminlink(self)
|
|||
end
|
||||
|
||||
function wifinet.get_network(self)
|
||||
if _uci_real:get("network", self.iwdata.network) == "interface" then
|
||||
return network(self.iwdata.network)
|
||||
local net = tostring(self.iwdata.network)
|
||||
if net and _uci_real:get("network", net) == "interface" then
|
||||
return network(net)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue