From e3734b48dfd86ec44166f0d0340d5d33bdd880eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sat, 8 Oct 2022 12:43:51 +0200 Subject: [PATCH] =?UTF-8?q?Odstran=C4=9Bny=20dvojit=C3=A1=20=C4=8D=C3=ADsl?= =?UTF-8?q?a=20ve=20v=C3=BDsledkovce=20ro=C4=8Dn=C3=ADku.=20Django=20datab?= =?UTF-8?q?=C3=A1zov=C3=A9=20dotazy=20ob=C4=8Das=20nech=C3=A1pu.?= 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 11af3a6a..7575a649 100644 --- a/seminar/models/tvorba.py +++ b/seminar/models/tvorba.py @@ -97,7 +97,7 @@ class Rocnik(SeminarModelBase): return vc[-1] if vc else None def verejne_vysledkovky_cisla(self): - vc = list(self.cisla.filter(deadline_v_cisle__verejna_vysledkovka=True)) + vc = list(self.cisla.filter(deadline_v_cisle__verejna_vysledkovka=True).distinct()) vc.sort(key=lambda c: c.poradi) return vc