From dd4b24d999a1f8b01569e6b2a1d9b3460545d074 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 6 Aug 2020 15:21:16 +0200 Subject: [PATCH] Don't match users only with the start of the name --- apps/member/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/member/views.py b/apps/member/views.py index 73fb4d90..83304b06 100644 --- a/apps/member/views.py +++ b/apps/member/views.py @@ -185,9 +185,9 @@ class UserListView(ProtectQuerysetMixin, LoginRequiredMixin, SingleTableView): Q(first_name__iregex=pattern) | Q(last_name__iregex=pattern) | Q(profile__section__iregex=pattern) - | Q(username__iregex="^" + pattern) - | Q(alias__iregex="^" + pattern) - | Q(normalized_alias__iregex=Alias.normalize("^" + pattern)) + | Q(username__iregex=pattern) + | Q(alias__iregex=pattern) + | Q(normalized_alias__iregex=Alias.normalize(pattern)) ) else: qs = qs.none()