forked from MarseyWorld/MarseyWorld
don't include sbed users in songs
parent
83f4e6e397
commit
7025cbe983
|
@ -189,7 +189,7 @@ def random_post(v):
|
||||||
@app.get("/random_user")
|
@app.get("/random_user")
|
||||||
@auth_required
|
@auth_required
|
||||||
def random_user(v):
|
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).filter(User.song != None, User.shadowbanned == None).order_by(func.random()).first()
|
||||||
|
|
||||||
if u: u = u[0]
|
if u: u = u[0]
|
||||||
else: return "No users have set a profile anthem so far!"
|
else: return "No users have set a profile anthem so far!"
|
||||||
|
|
Loading…
Reference in New Issue