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(