gluon-config-mode: fix coordinates when disabled

This commit is contained in:
Nils Schneider 2014-03-02 19:28:59 +01:00
parent 59a28c6721
commit 020169f292

View File

@ -118,7 +118,7 @@ function f.handle(self, state, data)
local sname = uci:get_first("gluon-node-info", "location")
uci:set("gluon-node-info", sname, "share_location", data._location)
if data._location then
if data._location and data._latitude ~= nil and data._longitude ~= nil then
uci:set("gluon-node-info", sname, "latitude", data._latitude)
uci:set("gluon-node-info", sname, "longitude", data._longitude)
end