gluon-config-mode-geo-location: 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:13:20 +02:00
parent 4f51439167
commit cd9ee858b8
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -52,11 +52,7 @@ return function(form, uci)
o.datatype = "float"
o.optional = true
function o:write(data)
if data then
uci:set("gluon-node-info", location, "altitude", data)
else
uci:delete("gluon-node-info", location, "altitude")
end
uci:set("gluon-node-info", location, "altitude", data)
end
end