From c74857c7e7be63ef8b98d9a3b404caef71d764d1 Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Fri, 7 Aug 2020 09:56:44 +0200 Subject: [PATCH] use alias name when searching --- app/api/serializer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/api/serializer.py b/app/api/serializer.py index be5ce8e3..31b85784 100644 --- a/app/api/serializer.py +++ b/app/api/serializer.py @@ -146,7 +146,11 @@ def get_alias_infos_with_pagination_v2( if query: q = q.filter( - or_(Alias.email.ilike(f"%{query}%"), Alias.note.ilike(f"%{query}%")) + or_( + Alias.email.ilike(f"%{query}%"), + Alias.note.ilike(f"%{query}%"), + Alias.name.ilike(f"%{query}%"), + ) ) if alias_filter == "enabled":