|
|
@ -37,9 +37,9 @@ class ResitelAutocomplete(LoginRequiredAjaxMixin,autocomplete.Select2QuerySetVie |
|
|
|
query = Q() |
|
|
|
for part in parts: |
|
|
|
query &= ( |
|
|
|
Q(osoba__jmeno__istartswith=self.q)| |
|
|
|
Q(osoba__prijmeni__istartswith=self.q)| |
|
|
|
Q(osoba__prezdivka__istartswith=self.q) |
|
|
|
Q(osoba__jmeno__istartswith=part)| |
|
|
|
Q(osoba__prijmeni__istartswith=part)| |
|
|
|
Q(osoba__prezdivka__istartswith=part) |
|
|
|
) |
|
|
|
qs = qs.filter(query) |
|
|
|
return qs |
|
|
|