fix locating aka call scanNow()

This commit is contained in:
Laura Klünder 2016-12-28 13:46:04 +01:00
parent 229b4d5ac9
commit 7cf59dab23
3 changed files with 54 additions and 31 deletions

View file

@ -208,7 +208,7 @@ class LocationViewSet(ViewSet):
def wifilocate(self, request):
stations = json.loads(request.POST['stations'])[:200]
if not stations:
return Response({})
return Response({'location': None})
bssids = get_bssid_areas_cached()
stations = sorted(stations, key=lambda l: l['level'])