summaryrefslogtreecommitdiff
path: root/lib/Travelynx.pm
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-08-25 16:36:02 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-08-25 16:36:02 +0200
commit6f3710c5cbecf7e531a3fcd1a40505b2afd18592 (patch)
tree6a406dea663db971769fee261e326e74b74457e1 /lib/Travelynx.pm
parent60ce72a9543526df969359a8196dc3bb5dc6bf0e (diff)
IRIS: Re-add support for stations unknown to T::S::DE::IRIS::Stations2.8.31
This fixes a regression introduced by 47f76da4f8cc31146d2834dfdf9731d330288c9d Closes #159 Journeys logged with travelynx v2.8.0 through 2.8.30 are affected by this bug and will contain incorrect data even after applying this patch – it only fixes data for new entries. To Do: See if affected entries can be repaired with a DB migration
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-xlib/Travelynx.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index 0c8d0f2..4a929f4 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -1409,6 +1409,14 @@ sub startup {
my ( $new_route, $journey, $polyline ) = @_;
my $db_route;
+ for my $stop ( $journey->route ) {
+ $self->stations->add_or_update(
+ stop => $stop,
+ db => $db,
+ iris => 1,
+ );
+ }
+
for my $i ( 0 .. $#{$new_route} ) {
my $old_name = $route->[$i][0];
my $old_eva = $route->[$i][1];