manual journey entry: hardcode DB (HAFAS) for station selection
TODO: Add a dropdown to select different backends Closes #150
This commit is contained in:
parent
aec37cce68
commit
0c5908e722
2 changed files with 7 additions and 4 deletions
|
@ -2116,6 +2116,7 @@ sub add_journey_form {
|
|||
|
||||
$opt{db} = $db;
|
||||
$opt{uid} = $self->current_user->{id};
|
||||
$opt{backend_id} = 1;
|
||||
|
||||
my ( $journey_id, $error ) = $self->journeys->add(%opt);
|
||||
|
||||
|
|
|
@ -118,8 +118,10 @@ sub add {
|
|||
my $db = $opt{db};
|
||||
my $uid = $opt{uid};
|
||||
my $now = DateTime->now( time_zone => 'Europe/Berlin' );
|
||||
my $dep_station = $self->{stations}->search( $opt{dep_station} );
|
||||
my $arr_station = $self->{stations}->search( $opt{arr_station} );
|
||||
my $dep_station = $self->{stations}
|
||||
->search( $opt{dep_station}, backend_id => $opt{backend_id} );
|
||||
my $arr_station = $self->{stations}
|
||||
->search( $opt{arr_station}, backend_id => $opt{backend_id} );
|
||||
|
||||
if ( not $dep_station ) {
|
||||
return ( undef, 'Unbekannter Startbahnhof' );
|
||||
|
|
Loading…
Reference in a new issue