routertools: Don't use old coordinates for hood assignment
If no lat/lng or hood is sent, the device should go to Default. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
07208b6f5c
commit
7f81bff24b
|
@ -56,10 +56,10 @@ def import_nodewatcher_xml(mysql, mac, xml):
|
|||
# router didn't send his hood in XML
|
||||
lat = router_update.get("lat")
|
||||
lng = router_update.get("lng")
|
||||
if olddata and not lat and not lng:
|
||||
# hoods might change as well
|
||||
lat = olddata.get("lat")
|
||||
lng = olddata.get("lng")
|
||||
#if olddata and not lat and not lng:
|
||||
# # hoods might change as well
|
||||
# lat = olddata.get("lat")
|
||||
# lng = olddata.get("lng")
|
||||
if lat and lng:
|
||||
router_update["hood"] = mysql.findone("""
|
||||
SELECT name,
|
||||
|
|
Loading…
Reference in New Issue