1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

Regexp must begin with ^

This commit is contained in:
Yohann D'ANELLO
2020-03-10 17:16:03 +01:00
parent 185f6ce4e3
commit aa731d1ae4
3 changed files with 5 additions and 5 deletions

View File

@ -300,7 +300,7 @@ class UserAutocomplete(autocomplete.Select2QuerySetView):
qs = User.objects.all()
if self.q:
qs = qs.filter(username__regex=self.q)
qs = qs.filter(username__regex="^" + self.q)
return qs