Fixed 404 on random user button and changed icons

This commit is contained in:
Michael House 2022-06-05 17:02:34 -05:00
parent 2e7f34608c
commit e7c7fba0ad
4 changed files with 12 additions and 12 deletions

View file

@ -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)