diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-08-04 20:41:25 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-08-04 20:41:25 +0200 |
commit | 1bb348ad9a62884309373a5249165478fd13a627 (patch) | |
tree | 4689baa5cfef71242e606523de32f9025bffe8f0 | |
parent | 0c5908e722a757ae86222df920cf0ceaf2bb6217 (diff) |
journey->add: pass backend_id on to station search for route2.8.9
Ref: #150
-rwxr-xr-x | lib/Travelynx/Model/Journeys.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index 00f79b3..eca5167 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -185,7 +185,8 @@ sub add { if ( $opt{route} ) { my @unknown_stations; for my $station ( @{ $opt{route} } ) { - my $station_info = $self->{stations}->search($station); + my $station_info = $self->{stations} + ->search( $station, backend_id => $opt{backend_id} ); if ($station_info) { push( @route, @@ -249,7 +250,7 @@ sub add { edited => 0x3fff, cancelled => $opt{cancelled} ? 1 : 0, route => JSON->new->encode( \@route ), - backend_id => 1, + backend_id => $opt{backend_id}, }; if ( $opt{comment} ) { |