Unverified Commit 420de7ee authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

train_details: $departure->{date} is undef if HAFAS request failed

parent 70b8717c
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -224,6 +224,7 @@
      </ul>
%   }
%   if ($departure->{route_pre_diff} and $departure->{route_post_diff}) {
%     if ($departure->{date}) {
%=      l 'Fahrtverlauf am'
%       if (stash('train') !~ m{[|]}) {
          <a href="<%= url_for('train', train => stash('train'))->query({detailed => param('detailed'), past => param('past'), rt => param('rt'), hafas => param('hafas'), date => $departure->{date}->clone->subtract(days => 1)->strftime('%d.%m.%Y'), highlight => param('highlight') // stash('station')}) %>">◀</a>
@@ -231,6 +232,7 @@
%=      $departure->{date}->strftime('%d.%m.%Y')
%       if (stash('train') !~ m{[|]}) {
        <a href="<%= url_for('train', train => stash('train'))->query({detailed => param('detailed'), past => param('past'), rt => param('rt'), hafas => param('hafas'), date => $departure->{date}->clone->add(days => 1)->strftime('%d.%m.%Y'), highlight => param('highlight') // stash('station')}) %>">▶</a>
%       }
%     }
      <ul class="mroute">
%       for my $stop (@{$departure->{route_pre_diff}}) {