Fixed 404 on random user button and changed icons
This commit is contained in:
parent
2e7f34608c
commit
e7c7fba0ad
4 changed files with 12 additions and 12 deletions
|
@ -473,8 +473,7 @@ def random_post(v):
|
|||
@app.get("/random_user")
|
||||
@auth_required
|
||||
def random_user(v):
|
||||
|
||||
u = g.db.query(User.username).filter(User.song != None).order_by(func.random()).first()
|
||||
u = g.db.query(User.username).order_by(func.random()).first()
|
||||
|
||||
if u: u = u[0]
|
||||
else: abort(404)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue