Unverified Commit 0a2fdea5 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Journey->update: augment changed route with EVA IDs, if available

Closes #313
Related to #305
parent 36714861
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -443,10 +443,11 @@ sub update {
				}
			}

			# Otherwise, we need to fetch stop IDs so that polylines remain usable
			# (This is still TODO)
			# Otherwise, fetch stop IDs so that polylines remain usable
			if ( @new_route != @{ $opt{route} } ) {
				@new_route = map { [ $_, undef, {} ] } @{ $opt{route} };
				my %stop_id = map { $_->{name} => $_->{eva} }
				  $self->{stations}->get_by_names( @{ $opt{route} } );
				@new_route = map { [ $_, $stop_id{$_}, {} ] } @{ $opt{route} };
			}

			$rows = $db->update(