From 72b72899fdbf1423b2b6c753c0d0c07d67aae8d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Mon, 2 Jan 2023 21:20:00 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20odm=C4=9Bny=20maj=C3=AD=20h=C3=A1zet=20a?= =?UTF-8?q?lespo=C5=88=20404=20na=20=C5=A1patn=C3=A9=20=C4=8D=C3=ADslo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/views/views_all.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seminar/views/views_all.py b/seminar/views/views_all.py index 01c561eb..16f8ae55 100644 --- a/seminar/views/views_all.py +++ b/seminar/views/views_all.py @@ -442,8 +442,8 @@ class OdmenyView(generic.TemplateView): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) - fromcislo = Cislo.objects.get(rocnik=self.kwargs.get('frocnik'), poradi=self.kwargs.get('fcislo')) - tocislo = Cislo.objects.get(rocnik=self.kwargs.get('trocnik'), poradi=self.kwargs.get('tcislo')) + fromcislo = get_object_or_404(Cislo, rocnik=self.kwargs.get('frocnik'), poradi=self.kwargs.get('fcislo')) + tocislo = get_object_or_404(Cislo, rocnik=self.kwargs.get('trocnik'), poradi=self.kwargs.get('tcislo')) resitele = aktivniResitele(tocislo) def get_diff(from_deadline: Deadline, to_deadline: Deadline):