use alias name when searching

This commit is contained in:
Son NK 2020-08-07 09:56:44 +02:00
parent 2f00294ba3
commit c74857c7e7

View file

@ -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":