summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-01-15 21:48:50 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-01-15 21:48:50 +0100
commit263fe6da63d88026479c1b5493a3054d0bc9d556 (patch)
tree6f7d4afda3e4745a994522cf5d3d19e3432c243e /lib
parentc6a0c76092f1cb4757e0d1c6b9b87fa39bdf9dca (diff)
do not store wagonorder error results in database1.13.3
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Travelynx.pm7
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',