libs/uci: fix attempt to assign empty tables in uci bind class
This commit is contained in:
parent
f7ab20f6e3
commit
98187975f9
1 changed files with 5 additions and 1 deletions
|
@ -126,7 +126,11 @@ end
|
|||
function bsection.set(self, k, v, c)
|
||||
local stat
|
||||
if type(c) == "string" then
|
||||
if type(v) == "table" and #v == 0 then
|
||||
stat = self:uciop("delete", c, k)
|
||||
else
|
||||
stat = self:uciop("set", c, k, v)
|
||||
end
|
||||
else
|
||||
self:uciop("foreach", self.stype,
|
||||
function(s)
|
||||
|
|
Loading…
Reference in a new issue