summaryrefslogtreecommitdiff
path: root/bin/db-iris
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-03-01 21:11:27 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-03-01 21:11:27 +0100
commit71a6127b20d4f62146b692ca9f70dc57999bd397 (patch)
tree64c169f691012aae9b4c05532f6c4e5b9bb7cbff /bin/db-iris
parent56685ea830077964eaa5fc083d2b0cd17bb90aa5 (diff)
fix --track-via <stop> not matching trains changing their ID at <stop>
Diffstat (limited to 'bin/db-iris')
-rwxr-xr-xbin/db-iris6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/db-iris b/bin/db-iris
index ffd70bf..f1bff19 100755
--- a/bin/db-iris
+++ b/bin/db-iris
@@ -302,7 +302,11 @@ for my $d ( $status->results() ) {
if ( not $d->departure ) {
next;
}
- my $d_via = first { $_->train_id eq $d->train_id } $status_via->results;
+ my $d_via = first {
+ $_->train_id eq $d->train_id
+ or ( $_->old_train_id and $_->old_train_id eq $d->train_id );
+ }
+ $status_via->results;
if ( not $d_via
or not $d_via->sched_arrival
or $d_via->sched_arrival < $d->departure )