From aff79d4151da0b8b0958a34b8090abac7a27260b Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Wed, 13 May 2026 16:28:50 +0000 Subject: [PATCH] =?UTF-8?q?OSM=20candidate=20wins=20over=20non-OSM=20retro?= =?UTF-8?q?fit=20design=20doc=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pashub_fetcher/pashub_client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/pashub_fetcher/pashub_client.py b/backend/pashub_fetcher/pashub_client.py index 556884fe..4435c278 100644 --- a/backend/pashub_fetcher/pashub_client.py +++ b/backend/pashub_fetcher/pashub_client.py @@ -116,6 +116,9 @@ class PashubClient: latest_files: Dict[CoreFiles, EvidenceFileData] = {} for core_type, group in grouped.items(): + if core_type == CoreFiles.RETROFIT_DESIGN_DOC and len(group) > 1: + osm_candidates = [f for f in group if "-OSM-" in f.file_name] + group = osm_candidates if osm_candidates else group latest = max(group, key=lambda f: datetime.fromisoformat(f.created_utc)) latest_files[core_type] = latest