fix 500 error
parent
cfcc13505f
commit
a5f62a380a
|
@ -140,7 +140,7 @@ def poster_of_the_day_id():
|
|||
user = db.query(User, func.sum(Post.upvotes)).join(Post, Post.author_id == User.id).filter(
|
||||
Post.created_utc > t,
|
||||
User.admin_level == 0,
|
||||
).group_by(User).order_by(func.sum(Post.upvotes).desc()).one_or_none()
|
||||
).group_by(User).order_by(func.sum(Post.upvotes).desc()).first()
|
||||
|
||||
if not user: return SNAPPY_ID
|
||||
|
||||
|
|
Loading…
Reference in New Issue