diff --git a/agenda/trip.py b/agenda/trip.py index 95dd802..8cab498 100644 --- a/agenda/trip.py +++ b/agenda/trip.py @@ -237,9 +237,9 @@ def get_locations(trip: Trip) -> dict[str, StrDict]: locations["ferry_terminal"][terminal["name"]] = terminal for s in station_list: - if s["uic"] in locations["station"]: + if s["name"] in locations["station"]: continue - locations["station"][s["uic"]] = s + locations["station"][s["name"]] = s return locations @@ -336,7 +336,7 @@ def get_trip_routes(trip: Trip, data_dir: str) -> list[StrDict]: assert t["type"] == "train" for leg in t["legs"]: train_from, train_to = leg["from_station"], leg["to_station"] - geojson_filename = train_from.get("routes", {}).get(train_to["uic"]) + geojson_filename = train_from.get("routes", {}).get(train_to["name"]) key = "_".join(["train"] + sorted([train_from["name"], train_to["name"]])) if not geojson_filename: routes.append(