From 4b0b8302330024419636949875ae05c898f766ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Wed, 25 Dec 2024 13:18:45 +0100 Subject: [PATCH] don't update APs when not needed --- src/c3nav/mapdata/management/commands/importnoc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/c3nav/mapdata/management/commands/importnoc.py b/src/c3nav/mapdata/management/commands/importnoc.py index 173812f4..9cacab9e 100644 --- a/src/c3nav/mapdata/management/commands/importnoc.py +++ b/src/c3nav/mapdata/management/commands/importnoc.py @@ -130,6 +130,9 @@ class Command(BaseCommand): if not result: old_result = result result = RangingBeacon(import_tag=import_tag) + else: + if result.space == new_space and distance(unwrap_geom(result.geometry), new_geometry) < 0.03: + continue result.comment = name result.space = new_space result.geometry = new_geometry