mirror of
https://git.wownero.com/wownero/YellWOWPages.git
synced 2024-08-15 01:03:25 +00:00
return 404 when user cannot be found
This commit is contained in:
parent
9a51c3c4fb
commit
5af725f58d
1 changed files with 7 additions and 4 deletions
|
@ -75,10 +75,13 @@ async def user_page(name: str):
|
|||
if not name or len(name) <= 1:
|
||||
raise Exception("invalid name")
|
||||
|
||||
try:
|
||||
_user = User.select().where(
|
||||
User.username == name,
|
||||
User.address.is_null(False)
|
||||
).get()
|
||||
except:
|
||||
return abort(404)
|
||||
|
||||
return await render_template('user.html', users=[_user])
|
||||
|
||||
|
|
Loading…
Reference in a new issue