Autocomplete řešitelů: oprava víceslovného hledání
This commit is contained in:
parent
61e71efcc4
commit
0c5c923b06
1 changed files with 3 additions and 3 deletions
|
@ -37,9 +37,9 @@ class ResitelAutocomplete(LoginRequiredAjaxMixin,autocomplete.Select2QuerySetVie
|
||||||
query = Q()
|
query = Q()
|
||||||
for part in parts:
|
for part in parts:
|
||||||
query &= (
|
query &= (
|
||||||
Q(osoba__jmeno__istartswith=self.q)|
|
Q(osoba__jmeno__istartswith=part)|
|
||||||
Q(osoba__prijmeni__istartswith=self.q)|
|
Q(osoba__prijmeni__istartswith=part)|
|
||||||
Q(osoba__prezdivka__istartswith=self.q)
|
Q(osoba__prezdivka__istartswith=part)
|
||||||
)
|
)
|
||||||
qs = qs.filter(query)
|
qs = qs.filter(query)
|
||||||
return qs
|
return qs
|
||||||
|
|
Loading…
Reference in a new issue