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
|
return None
|
||||||
|
|
||||||
dep = data.get("departure", [])
|
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 {
|
return {
|
||||||
"arrival": arrival_iso,
|
"arrival": arrival_iso,
|
||||||
"operators": dep["operators"]
|
"operators": dep["operators"]
|
||||||
|
|||||||
Reference in New Issue
Block a user