From 420de7ee4d85463029d659527cae0351894273bd Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 6 Mar 2024 18:24:32 +0100 Subject: train_details: $departure->{date} is undef if HAFAS request failed --- templates/_train_details.html.ep | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 4943ba2..12aab91 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -224,13 +224,15 @@ % } % if ($departure->{route_pre_diff} and $departure->{route_post_diff}) { -%= l 'Fahrtverlauf am' -% if (stash('train') !~ m{[|]}) { - -% } -%= $departure->{date}->strftime('%d.%m.%Y') -% if (stash('train') !~ m{[|]}) { - +% if ($departure->{date}) { +%= l 'Fahrtverlauf am' +% if (stash('train') !~ m{[|]}) { + +% } +%= $departure->{date}->strftime('%d.%m.%Y') +% if (stash('train') !~ m{[|]}) { + +% } % }