This commit is contained in:
rimu 2024-02-05 07:35:09 +13:00
parent d69dac7631
commit f6a382d0a7

View file

@ -147,9 +147,9 @@ def show_community(community: Community):
posts = posts.filter(Post.nsfw == False)
content_filters = user_filters_posts(current_user.id)
domains_ids = blocked_domains(current_user.id)
if domains_ids:
posts = posts.filter(or_(Post.domain_id.not_in(domains_ids), Post.domain_id == None))
domains_ids = blocked_domains(current_user.id)
if domains_ids:
posts = posts.filter(or_(Post.domain_id.not_in(domains_ids), Post.domain_id == None))
if sort == '' or sort == 'hot':
posts = posts.order_by(desc(Post.ranking))