mirror of
https://git.wownero.com/wownero/YellWOWPages.git
synced 2024-08-15 01:03:25 +00:00
The ability to remove address and reduce min. search length to 1 (thanks keycloak!)
This commit is contained in:
parent
5fc91af0a4
commit
6d86bf77e7
3 changed files with 19 additions and 9 deletions
|
@ -22,10 +22,10 @@ class User(pw.Model):
|
|||
|
||||
@staticmethod
|
||||
async def search(needle) -> List['User']:
|
||||
if not needle:
|
||||
raise Exception("need search term")
|
||||
needle = needle.replace("*", "")
|
||||
needle = needle.lower()
|
||||
if len(needle) <= 1:
|
||||
raise Exception("need longer search term")
|
||||
|
||||
return User.select().where(
|
||||
User.address.is_null(False),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue