mirror of
https://github.com/kaaninchen/Gleiswechsel.git
synced 2026-07-21 19:52:47 +00:00
fix: returne None wenn keine Ankunftszeiten
This commit is contained in:
+1
-1
@@ -53,7 +53,7 @@ def get_train_info(station, train_ID, train_type):
|
||||
return None
|
||||
|
||||
dep = data.get("departure", [])
|
||||
arrival_iso = dep["route_post_diff"][-1]["sched_arr"]
|
||||
arrival_iso = dep.get("route_post_diff", [])[-1].get("sched_arr")
|
||||
return {
|
||||
"arrival": arrival_iso,
|
||||
"operators": dep["operators"]
|
||||
|
||||
Reference in New Issue
Block a user