From 0aea221843dbc5e2e32c1334dbf0652755a04938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrej=20Rama=C5=A1euski?= <andrej@x2.cz> Date: Thu, 10 Oct 2024 00:21:40 +0200 Subject: [PATCH] Pandas's trap --- .gitlab-ci.yml | 2 +- lib/CF2022/Controller/Orders.pm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f2176f0..7eade46 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ image: docker:latest variables: DOCKER_TLS_CERTDIR: "/certs" - IMAGE_VER: 0.20.2 + IMAGE_VER: 0.21.0 services: - docker:dind diff --git a/lib/CF2022/Controller/Orders.pm b/lib/CF2022/Controller/Orders.pm index 2355392..fbcb1eb 100644 --- a/lib/CF2022/Controller/Orders.pm +++ b/lib/CF2022/Controller/Orders.pm @@ -94,6 +94,8 @@ sub create ($c ) { PRODUCT: foreach my $product ( @{ $args->{products} } ) { + return $c->error(400, "Běž žebrat jinam, Pando") if $product->{price} < $c->config->{min_fee}; + $product->{id} = $c->mapped_product_id($product->{id}); next PRODUCT if $pt->{subsidy}{$product->{id}} && ! $product->{price}; -- GitLab