Skip to content
Snippets Groups Projects
Verified Commit 26fad4ef authored by Andrej Ramašeuski's avatar Andrej Ramašeuski
Browse files

Fixes

parent 96263514
No related branches found
No related tags found
No related merge requests found
Pipeline #11861 passed
......@@ -24,7 +24,7 @@ sub create ($c ) {
my $pt = {};
CLASS:
foreach my $class ( qw(main nonfree subsidy) ) {
foreach my $id ( split /\D+/, $cfg->{"products_$class"} ) {
foreach my $id ( split /\D+/, $c->config->{"products_$class"} ) {
$pt->{$class}{$id} = 1;
}
}
......@@ -105,7 +105,7 @@ sub create ($c ) {
$product->{id} = $accreditation;
}
elsif ( $pt->{nonfree}{ $product->{id} } ) {
$product->{id} = $cfg->{products_fallback};
$product->{id} = $c->config->{products_fallback};
}
}
......@@ -114,7 +114,7 @@ sub create ($c ) {
}
# fallback akreditace
@products = ( { id => $cfg->{products_fallback} }, @products ) if ! $accredited;
@products = ( { id => $c->config->{products_fallback} }, @products ) if ! $accredited;
my $order = {
email => $args->{email},
......@@ -149,7 +149,7 @@ sub create ($c ) {
company => $args->{company},
};
$item->{answers} = \@answers if $product->{id} =~ MAIN_PRODUCTS;
$item->{answers} = \@answers if $pt->{main}{$product->{id}};
push @{ $order->{positions} }, $item;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment