mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
upvoted list bug
This commit is contained in:
parent
0fa8c674b2
commit
f438a8d299
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ def show_profile(user):
|
|||
posts = Post.query.filter_by(user_id=user.id).order_by(desc(Post.posted_at)).paginate(page=post_page, per_page=50, error_out=False)
|
||||
moderates = Community.query.filter_by(banned=False).join(CommunityMember).filter(CommunityMember.user_id == user.id)\
|
||||
.filter(or_(CommunityMember.is_moderator, CommunityMember.is_owner))
|
||||
upvoted = Post.query.join(PostVote).filter(Post.id == PostVote.post_id, PostVote.effect > 0).order_by(desc(Post.posted_at)).limit(10).all()
|
||||
upvoted = Post.query.join(PostVote, PostVote.post_id == Post.id).filter(PostVote.effect > 0, PostVote.user_id == user.id).order_by(desc(PostVote.created_at)).limit(10).all()
|
||||
subscribed = Community.query.filter_by(banned=False).join(CommunityMember).filter(CommunityMember.user_id == user.id).all()
|
||||
if current_user.is_anonymous or user.id != current_user.id:
|
||||
moderates = moderates.filter(Community.private_mods == False)
|
||||
|
|
Loading…
Reference in a new issue