api/alfred: Introduce NoCoordinates hood

Previously, mesh routers without coordinates are assigned to the
default hood, even if they are meshing with routers from other
hoods.

To keep the default hood clean, we introduce the "NoCoordinates"
hood for all those routers.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2018-01-18 12:30:07 +01:00
parent 89beb1ba77
commit acf74276ce
1 changed files with 2 additions and 0 deletions

View File

@ -106,6 +106,8 @@ def import_nodewatcher_xml(mysql, mac, xml, banned, netifdict):
""",(lat,lng,lat,),"name")
if not router_update["hood"]:
router_update["hood"] = "Default"
if router_update["neighbours"] and not router_update["has_wan_uplink"]:
router_update["hood"] = "NoCoordinates"
if not router_update['lat'] and not router_update['lng'] and olddata and olddata['lat'] and olddata['lng']:
# Enable reset state; do before variable fallback
reset = True