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 GitHub
parent 7008848f9c
commit b95bbe2fae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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));
};