diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-31 12:47:30 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-31 12:47:30 +0200 |
commit | b27e37ffdc50840988fbf614c22d90ce44652d0d (patch) | |
tree | 56001474753fe348fe0e15206b7b4fdd251245db | |
parent | ae0e03dbe7f6989358efefab674922d5ce6ae0a6 (diff) |
work: dbris: update_arrival must run before cancellation-induced checkouts2.12.4
-rw-r--r-- | lib/Travelynx/Command/work.pm | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm index fe6d9e4..4876e98 100644 --- a/lib/Travelynx/Command/work.pm +++ b/lib/Travelynx/Command/work.pm @@ -110,19 +110,7 @@ sub run { $train_id, $found_dep->eva ); } - if ( $found_arr and $found_arr->is_cancelled ) { - - # check out (adds a cancelled journey and resets journey state - # to destination selection) - $self->app->checkout_p( - station => $arr, - force => 0, - dep_eva => $dep, - arr_eva => $arr, - uid => $uid - )->wait; - } - elsif ( $found_arr and $found_arr->rt_arr ) { + if ( $found_arr and $found_arr->rt_arr ) { $self->app->in_transit->update_arrival_dbris( uid => $uid, journey => $journey, @@ -146,6 +134,18 @@ sub run { $found_arr->eva ); } } + if ( $found_arr and $found_arr->is_cancelled ) { + + # check out (adds a cancelled journey and resets journey state + # to destination selection) + $self->app->checkout_p( + station => $arr, + force => 0, + dep_eva => $dep, + arr_eva => $arr, + uid => $uid + )->wait; + } } )->catch( sub { |