diff --git a/backend/open_data_connector.py b/backend/open_data_connector.py index 1021d8a..32b9f64 100644 --- a/backend/open_data_connector.py +++ b/backend/open_data_connector.py @@ -160,10 +160,14 @@ def import_event_rows(rows: list[dict], source_name: str, notes: str) -> dict: imported_at = now_iso() db_rows = [] + seen_ids = set() for item in rows: event_type = item.get("event_type") if event_type not in VALID_TYPES: continue + if item["id"] in seen_ids: + continue + seen_ids.add(item["id"]) db_rows.append( ( diff --git a/docs/open_data_sources_nrw_live.json b/docs/open_data_sources_nrw_live.json index d6ece13..541331d 100644 --- a/docs/open_data_sources_nrw_live.json +++ b/docs/open_data_sources_nrw_live.json @@ -45,7 +45,6 @@ "source_name": "koeln_baustellen_notfall", "coord_crs": "EPSG:25832", "field_map": { - "external_id": "properties.Aktenzeichen", "lat": "geometry.coordinates.1", "lon": "geometry.coordinates.0", "event_type": "properties.Kategorie",