From ebe3bd8edada9c153418fc540ef58a5cc30c1256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Fri, 30 Sep 2022 21:35:39 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20hromadn=C3=A9=20p=C5=99id=C3=A1v=C3=A1tk?= =?UTF-8?q?o=20(neum=C3=ADm=20pou=C5=BE=C3=ADvat=20clean=E2=80=A6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/views/docasne.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/seminar/views/docasne.py b/seminar/views/docasne.py index 108360f5..cbad789b 100644 --- a/seminar/views/docasne.py +++ b/seminar/views/docasne.py @@ -36,6 +36,7 @@ class HromadnePridaniForm(Form): nazev__exact=self.cleaned_data['tema'], nadproblem=None).count() != 1: raise ValidationError("Špatný nebo nepřesně zadaný název témátka") + return self.cleaned_data['tema'] def clean_body(self): """ Kontrola, že `body` je seznam čísel """ @@ -43,6 +44,7 @@ class HromadnePridaniForm(Form): list(map(int, self.cleaned_data["body"].split(","))) except ValueError: raise ValidationError("Špatný formát bodů") + return self.cleaned_data['body'] class HromadnePridaniView(FormView):