summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-09-21 16:23:23 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-09-21 16:23:23 +0200
commitd7daa73ca0f3df3127a4f43dccf4c3730b0beb11 (patch)
treee10a0bc3ac2f45d29acb4326625be40655a8acda
parent93689a4f76d6f6997663aa2d30fbfb5500d3fc27 (diff)
result_has_via: include cancelled stops4.30.2
This avoids confusion when a via filter should return results, but does not due to cancellations / diversions.
-rw-r--r--lib/DBInfoscreen/Controller/Stationboard.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm
index b8bce2a..4c27ef4 100644
--- a/lib/DBInfoscreen/Controller/Stationboard.pm
+++ b/lib/DBInfoscreen/Controller/Stationboard.pm
@@ -242,8 +242,9 @@ sub result_has_via {
my ( $result, $via ) = @_;
my @route
- = $result->can('route_post') ? $result->route_post : map { $_->loc->name }
- $result->route;
+ = $result->can('route_post')
+ ? ( $result->route_post, $result->sched_route_post )
+ : map { $_->loc->name } $result->route;
my $eq_result = List::MoreUtils::any { lc eq lc($via) } @route;