Skip to content
Snippets Groups Projects
Unverified Commit 4f514391 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-config-mode-contact-info: remove uci:set() nil check

simple-uci will now delete an option when nil is passed.
parent 31721a61
No related branches found
No related tags found
No related merge requests found
...@@ -16,11 +16,7 @@ return function(form, uci) ...@@ -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'}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment