do not store wagonorder error results in database
This commit is contained in:
parent
c6a0c76092
commit
263fe6da63
1 changed files with 5 additions and 2 deletions
|
@ -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',
|
||||||
|
|
Loading…
Reference in a new issue