From a59e2f99777c36eb24f8c03909092fec10b17dd0 Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Sun, 3 Mar 2024 22:44:59 +0100 Subject: [PATCH] =?UTF-8?q?U=C5=BEite=C4=8Dn=C3=A1=20chybov=C3=A1=20str?= =?UTF-8?q?=C3=A1nka=20pro=20ne=C3=BAsp=C4=9B=C5=A1n=C3=A9=20generov=C3=A1?= =?UTF-8?q?n=C3=AD=20ob=C3=A1lek?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/views/views_all.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/seminar/views/views_all.py b/seminar/views/views_all.py index 318eee21..9dc03550 100644 --- a/seminar/views/views_all.py +++ b/seminar/views/views_all.py @@ -562,6 +562,11 @@ def cisloObalkyView(request, rocnik, cislo): def obalkyView(request, resitele): + if len(resitele) == 0: + return render(request, 'universal.html', { + 'title': 'Není pro koho vyrobit obálky.', + 'text': 'Právě ses pokusil/a vygenerovat obálky pro prázdnou množinu lidí. Můžeš to zkusit změnit, případně se zeptej webařů :-)', + }) tex = render(request,'seminar/archiv/obalky.tex', {'resitele': resitele}).content tempdir = tempfile.mkdtemp()