fix over_18 collapsing

pull/176/head
Aevann 2023-08-04 02:54:44 +03:00
parent a0d40c94b5
commit a7f3dad605
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ class Comment(Base):
if path.endswith(f'/{self.id}'): return False
if self.over_18 and not (v and v.over_18) and not (path.startswith('/post/') and self.post.over_18): return True
if self.over_18 and not (v and v.over_18) and not (any(path.startswith(x) for x in ('/post/','/comment/','/h/')) and self.post.over_18): return True
if self.is_banned: return True