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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user