From efdd32427e2b6300b1ab4e2032818dca80d172c8 Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Tue, 5 Jan 2021 23:23:18 +0100 Subject: [PATCH] =?UTF-8?q?Autocomplete:=20Dopl=C5=88ovat=20i=20=C4=8Dl?= =?UTF-8?q?=C3=A1nky?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/views/autocomplete.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/seminar/views/autocomplete.py b/seminar/views/autocomplete.py index 04ddca83..32c634bc 100644 --- a/seminar/views/autocomplete.py +++ b/seminar/views/autocomplete.py @@ -34,7 +34,9 @@ class OdevzdatelnyProblemAutocomplete(autocomplete.Select2QuerySetView): rocnik = nastaveni.aktualni_rocnik temata = m.Tema.objects.filter(rocnik=rocnik, stav=m.Problem.STAV_ZADANY) ulohy = m.Uloha.objects.filter(cislo_deadline__rocnik = rocnik) + clanky = m.Clanek.objects.filter(cislo__rocnik = rocnik, stav=m.Problem.STAV_ZADANY) # FIXME: Je tohle to, co chceme? ulohy.union(temata) + ulohy.union(clanky) qs = ulohy if self.q: qs = qs.filter(