Commit a1174bdb authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

marudor: do not request auslastung if there's not next_station

parent d110ce1d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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(