From 263fe6da63d88026479c1b5493a3054d0bc9d556 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 15 Jan 2020 21:48:50 +0100 Subject: do not store wagonorder error results in database --- lib/Travelynx.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') 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', -- cgit v1.2.3