From f681aa41db5f26db38d8a8dc68e5a0fea1402f8c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 6 Apr 2023 15:16:52 +0200 Subject: [PATCH] Perl is hard --- lib/Travelynx/Command/work.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm index 7eaf4ce..74a29e6 100644 --- a/lib/Travelynx/Command/work.pm +++ b/lib/Travelynx/Command/work.pm @@ -164,9 +164,13 @@ sub run { ); } else { - $self->app->add_route_timestamps( $uid, $train, 0, - defined $entry->{real_arr_ts} - and $now->epoch > $entry->{real_arr_ts} ); + $self->app->add_route_timestamps( + $uid, $train, 0, + ( + defined $entry->{real_arr_ts} + and $now->epoch > $entry->{real_arr_ts} + ) ? 1 : 0 + ); } } elsif ( $entry->{real_arr_ts} ) {