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:
Adrian Schmutzler 2017-11-23 13:09:08 +01:00
parent 07208b6f5c
commit 7f81bff24b
1 changed files with 4 additions and 4 deletions

View File

@ -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,