OSM candidate wins over non-OSM retrofit design doc 🟩

This commit is contained in:
Daniel Roth 2026-05-13 16:28:50 +00:00
parent b685008e5e
commit aff79d4151

View file

@ -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