diff options
Diffstat (limited to 'lib/DBInfoscreen/Helper/Marudor.pm')
-rw-r--r-- | lib/DBInfoscreen/Helper/Marudor.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/DBInfoscreen/Helper/Marudor.pm b/lib/DBInfoscreen/Helper/Marudor.pm index cdc90f4..f2a58cf 100644 --- a/lib/DBInfoscreen/Helper/Marudor.pm +++ b/lib/DBInfoscreen/Helper/Marudor.pm @@ -139,6 +139,11 @@ sub get_train_utilization { $next_station = $route[0]; } + if ( not $next_station ) { + $promise->reject("train has no next_station"); + return $promise; + } + $self->get_json_p( $self->{realtime_cache}, "https://marudor.de/api/hafas/v2/auslastung/${this_station}/${next_station}/${train_no}/${dep}" )->then( |