From a7f3dad605b9498ee14d93962004be540cbac62c Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 4 Aug 2023 02:54:44 +0300 Subject: [PATCH] fix over_18 collapsing --- files/classes/comment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index d8306cef6..993c8b608 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -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