do not store wagonorder error results in database

This commit is contained in:
Daniel Friesel 2020-01-15 21:48:50 +01:00
parent c6a0c76092
commit 263fe6da63

View file

@ -2274,7 +2274,8 @@ sub startup {
my $data = $res_h->{data} // {}; my $data = $res_h->{data} // {};
my $user_data = $res_h->{user_data} // {}; my $user_data = $res_h->{user_data} // {};
if ($is_departure) { if ( $is_departure and not exists $wagonorder->{error} )
{
$data->{wagonorder_dep} = $wagonorder; $data->{wagonorder_dep} = $wagonorder;
if ( exists $user_data->{wagongroups} ) { if ( exists $user_data->{wagongroups} ) {
$user_data->{wagongroups} = []; $user_data->{wagongroups} = [];
@ -2322,7 +2323,9 @@ sub startup {
{ user_id => $uid } { user_id => $uid }
); );
} }
else { elsif ( not $is_departure
and not exists $wagonorder->{error} )
{
$data->{wagonorder_arr} = $wagonorder; $data->{wagonorder_arr} = $wagonorder;
$db->update( $db->update(
'in_transit', 'in_transit',