From 3d107400f1d859c511dac738b11c0312631eca09 Mon Sep 17 00:00:00 2001
From: Martin Mares <mj@ucw.cz>
Date: Sun, 9 Feb 2025 11:32:29 +0100
Subject: [PATCH] =?UTF-8?q?Diplomy/UI:=20"Smazat=20diplomy"=20lze=20i=20s?=
 =?UTF-8?q?=20nekorektn=C4=9B=20vypln=C4=9Bn=C3=BDm=20formul=C3=A1=C5=99em?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 mo/web/org_certs.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mo/web/org_certs.py b/mo/web/org_certs.py
index 42a8a088..7c6dc6cd 100644
--- a/mo/web/org_certs.py
+++ b/mo/web/org_certs.py
@@ -80,6 +80,9 @@ class CertSetForm(FlaskForm):
     delete = wtforms.SubmitField("Smazat diplomy")
 
     def osmo_validate(self, cset) -> bool:
+        if self.delete.data:
+            return True
+
         ok = True
 
         if self.background_type.data == BackgroundType.custom and self.upload_background.data is None and not cset.background_file:
-- 
GitLab