Unverified Commit 07daf104 authored by Joost Rijneveld's avatar Joost Rijneveld
Browse files

members: only search in nicks when displayed

parent d5380dfd
......@@ -38,7 +38,10 @@ def filter_users(tab, keywords, year_range):
if keywords:
for key in keywords:
members_query &= (Q(nickname__icontains=key) |
members_query &= (
(Q(user__member__nickname__icontains=key) &
# Works because relevant options all have `nick` in their key
Q(user__member__display_name_preference__contains='nick')) |
Q(user__first_name__icontains=key) |
Q(user__last_name__icontains=key) |
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment