connections: do not show cancelled trains twice

This commit is contained in:
Birte Kristina Friesel 2023-09-26 20:26:12 +02:00
parent 68ff417f0c
commit 2638dd36fb
No known key found for this signature in database
GPG key ID: B63118F7196EA660

View file

@ -276,6 +276,15 @@ sub get_connecting_trains_p {
eval { eval {
for my $iris_train (@iris_trains) { for my $iris_train (@iris_trains) {
if ( $iris_train->[0]->departure_is_cancelled ) { if ( $iris_train->[0]->departure_is_cancelled ) {
for my $hafas_train (@all_hafas_trains) {
if ( $hafas_train->number
and $hafas_train->number
== $iris_train->[0]->train_no )
{
$hafas_train->{iris_seen} = 1;
next;
}
}
next; next;
} }
for my $hafas_train (@all_hafas_trains) { for my $hafas_train (@all_hafas_trains) {