Unverified Commit 96dabc4c authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

edit journey: pass on backend ID for origin/destination changes

Closes #322
parent 548f651c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2570,6 +2570,7 @@ sub edit_journey {
	$self->render(
		'edit_journey',
		with_autocomplete => 1,
		backend_id        => $journey->{backend_id},
		error             => $error,
		journey           => $journey
	);
+4 −2
Original line number Diff line number Diff line
@@ -341,7 +341,8 @@ sub update {

	eval {
		if ( exists $opt{from_name} ) {
			my $from_station = $self->{stations}->search( $opt{from_name} );
			my $from_station = $self->{stations}
			  ->search( $opt{from_name}, backend_id => $journey->{backend_id} );
			if ( not $from_station ) {
				die("Unbekannter Startbahnhof\n");
			}
@@ -357,7 +358,8 @@ sub update {
			)->rows;
		}
		if ( exists $opt{to_name} ) {
			my $to_station = $self->{stations}->search( $opt{to_name} );
			my $to_station = $self->{stations}
			  ->search( $opt{to_name}, backend_id => $journey->{backend_id} );
			if ( not $to_station ) {
				die("Unbekannter Zielbahnhof\n");
			}