From e39ccd14b7382016e0e93d1ea6b9d6a64c4600ef Mon Sep 17 00:00:00 2001 From: Jonas Havelka Date: Thu, 16 Sep 2021 15:42:56 +0200 Subject: [PATCH] =?UTF-8?q?fix=20autocomplete=20=C5=99e=C5=A1itel=C5=AF=20?= =?UTF-8?q?nem=C3=A1=20b=C3=BDt=20case-sensitive?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/views/autocomplete.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/seminar/views/autocomplete.py b/seminar/views/autocomplete.py index 2b359c67..121ddefc 100644 --- a/seminar/views/autocomplete.py +++ b/seminar/views/autocomplete.py @@ -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