From e9973ffff0c59a79a213be8a8ec69448888572b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Thu, 6 Oct 2022 12:26:28 +0200 Subject: [PATCH] =?UTF-8?q?M=C4=9Bl=20bych=20si=20d=C3=A1t=20pauzu,=20v=20?= =?UTF-8?q?minul=C3=A9m=20commitu=20prost=C4=9B=20chyb=C3=AD=20tohle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/models/tvorba.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seminar/models/tvorba.py b/seminar/models/tvorba.py index 79f47092..11af3a6a 100644 --- a/seminar/models/tvorba.py +++ b/seminar/models/tvorba.py @@ -334,7 +334,7 @@ class Cislo(SeminarModelBase): posledni_deadline = self.posledni_deadline if posledni_deadline is None: # TODO promyslet, co se má stát tady - return Deadline.objects.filter(Q(cislo__poradi__lt=self.poradi) | Q(cislo__rocnik__rocnik__lt=self.rocnik.rocnik)).order_by("deadline").last() + return Deadline.objects.filter(Q(cislo__poradi__lt=self.poradi, cislo__rocnik=self.rocnik) | Q(cislo__rocnik__rocnik__lt=self.rocnik.rocnik)).order_by("deadline").last() return posledni_deadline return prvni_deadline