From 3637b3cdd5a3085f64454bdadc302b6994a0fd23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Wed, 27 Dec 2023 21:54:46 +0100 Subject: [PATCH] fix the thing with the lambda and stuff in locator --- src/c3nav/routing/locator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c3nav/routing/locator.py b/src/c3nav/routing/locator.py index 3af37976..7ada62f8 100644 --- a/src/c3nav/routing/locator.py +++ b/src/c3nav/routing/locator.py @@ -181,7 +181,7 @@ class Locator: spaces = tuple(space for pk, space in self.spaces.items() if pk not in restrictions.spaces) # find best point - best_peer_id = max(scan_data.items(), key=operator.itemgetter(1))[0] + best_peer_id = max(scan_data.items(), key=lambda v: v[1].rssi)[0] best_location = None best_score = float('inf') for space in spaces: