gluon-config-mode-contact-info: remove uci:set() nil check
simple-uci will now delete an option when nil is passed.
This commit is contained in:
parent
31721a61f5
commit
4f51439167
@ -16,11 +16,7 @@ return function(form, uci)
|
||||
-- without a minimal length, an empty string will be accepted even with "optional = false"
|
||||
o.datatype = "minlength(1)"
|
||||
function o:write(data)
|
||||
if data then
|
||||
uci:set("gluon-node-info", owner, "contact", data)
|
||||
else
|
||||
uci:delete("gluon-node-info", owner, "contact")
|
||||
end
|
||||
uci:set("gluon-node-info", owner, "contact", data)
|
||||
end
|
||||
|
||||
return {'gluon-node-info'}
|
||||
|
Loading…
Reference in New Issue
Block a user