Aevann 2024-10-20 14:33:34 +03:00
parent 9c06edcb0a
commit 23004cf823
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ def random_post(v):
Post.is_banned == False,
Post.draft == False,
or_(Post.hole == None, Post.hole.notin_(v.hole_blocks)),
).order_by(func.random()).first()
).join(Post.author).filter(User.shadowbanned == None).order_by(func.random()).first()
if p: p = p[0]
else: stop(404)