gluon-config-mode: fix coordinates when disabled

This commit is contained in:
Nils Schneider 2014-03-02 19:28:59 +01:00
parent 9aa4a147aa
commit b9a1de7286
1 changed files with 1 additions and 1 deletions

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