diff --git a/package/gluon-config-mode/files/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua b/package/gluon-config-mode/files/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua index 05ef304f..002ce487 100644 --- a/package/gluon-config-mode/files/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua +++ b/package/gluon-config-mode/files/usr/lib/lua/luci/model/cbi/gluon-config-mode/wizard.lua @@ -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