diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-05-29 21:49:31 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-05-29 21:49:31 +0200 |
commit | 85c7861bc135111c12b17b9d9961674d2f269f8d (patch) | |
tree | d4cd18fab721fd745cdfc46c1bb1e9935462abc0 /lib/Travelynx.pm | |
parent | 1ad8fa3a51b930807d76d92a2d42bdd7f4ef5b80 (diff) |
request wagon orders for HAFAS checkins
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-x | lib/Travelynx.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 19d4094..f1f5ed3 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -633,6 +633,10 @@ sub startup { # mustn't be called during a transaction if ( not $opt{in_transaction} ) { $self->run_hook( $uid, 'checkin' ); + if ( $journey->class <= 16 ) { + $self->app->add_wagonorder( $uid, 1, $journey->id, + $found->sched_dep, $journey->number ); + } } $promise->resolve($journey); @@ -1232,7 +1236,7 @@ sub startup { my $db = $self->pg->db; - if ($sched_departure) { + if ( $sched_departure and $train_no ) { $self->dbdb->has_wagonorder_p( $sched_departure, $train_no ) ->then( sub { |