diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-31 12:39:36 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-31 12:39:36 +0200 |
commit | ae0e03dbe7f6989358efefab674922d5ce6ae0a6 (patch) | |
tree | e5f7e602bc02eaf7edccfa43d72078e01fd5853f | |
parent | cc6601868c722e0423a4fe461109f936e68d0494 (diff) |
work: DBRIS: handle newly-cancelled destinations2.12.3
-rw-r--r-- | lib/Travelynx/Command/work.pm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Travelynx/Command/work.pm b/lib/Travelynx/Command/work.pm index 2caad05..fe6d9e4 100644 --- a/lib/Travelynx/Command/work.pm +++ b/lib/Travelynx/Command/work.pm @@ -110,7 +110,19 @@ sub run { $train_id, $found_dep->eva ); } - if ( $found_arr and $found_arr->rt_arr ) { + 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 ) { $self->app->in_transit->update_arrival_dbris( uid => $uid, journey => $journey, |