diff --git a/seminar/views/autocomplete.py b/seminar/views/autocomplete.py index 699a260e..f63ab5ac 100644 --- a/seminar/views/autocomplete.py +++ b/seminar/views/autocomplete.py @@ -36,9 +36,13 @@ class OdevzdatelnyProblemAutocomplete(autocomplete.Select2QuerySetView): 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) + print(temata, ulohy, clanky) + ulohy.union(temata, all=True) + print(ulohy) + ulohy.union(clanky, all=True) + print(ulohy) qs = ulohy + print(qs) if self.q: qs = qs.filter( Q(nazev__startswith=self.q))