diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-01-15 21:48:50 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-01-15 21:48:50 +0100 |
commit | 263fe6da63d88026479c1b5493a3054d0bc9d556 (patch) | |
tree | 6f7d4afda3e4745a994522cf5d3d19e3432c243e | |
parent | c6a0c76092f1cb4757e0d1c6b9b87fa39bdf9dca (diff) |
do not store wagonorder error results in database1.13.3
-rwxr-xr-x | lib/Travelynx.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index e71ad9e..2a72afc 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -2274,7 +2274,8 @@ sub startup { my $data = $res_h->{data} // {}; my $user_data = $res_h->{user_data} // {}; - if ($is_departure) { + if ( $is_departure and not exists $wagonorder->{error} ) + { $data->{wagonorder_dep} = $wagonorder; if ( exists $user_data->{wagongroups} ) { $user_data->{wagongroups} = []; @@ -2322,7 +2323,9 @@ sub startup { { user_id => $uid } ); } - else { + elsif ( not $is_departure + and not exists $wagonorder->{error} ) + { $data->{wagonorder_arr} = $wagonorder; $db->update( 'in_transit', |