Fix nsfw posts showing for non-logged in users. Fixes #1614 (#1615)

This commit is contained in:
Dessalines 2021-05-26 14:02:35 -04:00 committed by Felix Ableitner
parent 107e1a2500
commit ae23685346
2 changed files with 2 additions and 2 deletions

View File

@ -359,7 +359,7 @@ impl<'a> PostQueryBuilder<'a> {
query = query.filter(post::creator_id.eq(creator_id));
}
if !self.show_nsfw.unwrap_or(true) {
if !self.show_nsfw.unwrap_or(false) {
query = query
.filter(post::nsfw.eq(false))
.filter(community::nsfw.eq(false));

View File

@ -198,7 +198,7 @@ impl<'a> CommunityQueryBuilder<'a> {
}
};
if !self.show_nsfw.unwrap_or(true) {
if !self.show_nsfw.unwrap_or(false) {
query = query.filter(community::nsfw.eq(false));
};