lower() the searches

This commit is contained in:
dsc 2022-03-17 09:13:31 +02:00
parent 0dc31d47b2
commit d7ce4c9283
2 changed files with 2 additions and 0 deletions

View file

@ -23,6 +23,7 @@ class User(pw.Model):
@staticmethod
async def search(needle) -> List['User']:
needle = needle.replace("*", "")
needle = needle.lower()
if len(needle) <= 1:
raise Exception("need longer search term")