From 238ada5309129ebee55f01823110777ca5016cce Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 22 Nov 2023 21:25:55 +0100 Subject: Journey: support journey JSON that does not provide a date attribute --- lib/Travel/Status/DE/HAFAS/Journey.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Travel/Status/DE/HAFAS/Journey.pm b/lib/Travel/Status/DE/HAFAS/Journey.pm index 9295cae..d8d63ff 100644 --- a/lib/Travel/Status/DE/HAFAS/Journey.pm +++ b/lib/Travel/Status/DE/HAFAS/Journey.pm @@ -37,7 +37,7 @@ sub new { my $hafas = $opt{hafas}; my $journey = $opt{journey}; - my $date = $journey->{date}; + my $date = $opt{date} // $journey->{date}; my $direction = $journey->{dirTxt}; my $jid = $journey->{jid}; -- cgit v1.2.3