From 42a1897d155b2a18a3840839fc37fad4b87ed3bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrej=20Rama=C5=A1euski?= <andrej@x2.cz>
Date: Wed, 8 Mar 2023 01:20:16 +0100
Subject: [PATCH] Vypnuta kontrola duplicity v test modu

---
 .gitlab-ci.yml                  | 2 +-
 lib/CF2022/Controller/Orders.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 10f6443..c6fec68 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,7 +2,7 @@ image: docker:20.10.9
 
 variables:
   DOCKER_TLS_CERTDIR: "/certs"
-  IMAGE_VER: 0.13.3
+  IMAGE_VER: 0.13.4
 
 services:
   - docker:20.10.9-dind
diff --git a/lib/CF2022/Controller/Orders.pm b/lib/CF2022/Controller/Orders.pm
index 1326832..5bf42e8 100644
--- a/lib/CF2022/Controller/Orders.pm
+++ b/lib/CF2022/Controller/Orders.pm
@@ -84,7 +84,7 @@ sub create ($c ) {
         api      => $url,
     })->count if $claims;
 
-    return $c->error(400, 'Duplicity' ) if $exists;
+    return $c->error(400, 'Duplicity' ) if $exists && ! $c->cfg->{pretix_testmode};
 
     # korekce akreditace
     PRODUCT:
-- 
GitLab