fix autocomplete řešitelů nemá být case-sensitive

This commit is contained in:
Jonas Havelka 2021-09-16 15:42:56 +02:00
parent 671a049072
commit e39ccd14b7

View file

@ -23,9 +23,9 @@ class ResitelAutocomplete(LoginRequiredAjaxMixin,autocomplete.Select2QuerySetVie
qs = m.Resitel.objects.all()
if self.q:
qs = qs.filter(
Q(osoba__jmeno__startswith=self.q)|
Q(osoba__prijmeni__startswith=self.q)|
Q(osoba__prezdivka__startswith=self.q)
Q(osoba__jmeno__istartswith=self.q)|
Q(osoba__prijmeni__istartswith=self.q)|
Q(osoba__prezdivka__istartswith=self.q)
)
return qs