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:
Matthias Schiffer 2017-08-08 04:11:54 +02:00
parent 31721a61f5
commit 4f51439167
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -16,11 +16,7 @@ return function(form, uci)
-- without a minimal length, an empty string will be accepted even with "optional = false" -- without a minimal length, an empty string will be accepted even with "optional = false"
o.datatype = "minlength(1)" o.datatype = "minlength(1)"
function o:write(data) function o:write(data)
if data then
uci:set("gluon-node-info", owner, "contact", data) uci:set("gluon-node-info", owner, "contact", data)
else
uci:delete("gluon-node-info", owner, "contact")
end
end end
return {'gluon-node-info'} return {'gluon-node-info'}