use smarter approach that doesnt break when going to /post/43 for example

pull/173/head
Aevann 2023-08-01 09:44:15 +03:00
parent 106f8da561
commit 290b2a9a06
1 changed files with 1 additions and 1 deletions

View File

@ -386,7 +386,7 @@ class Comment(Base):
if path == '/admin/removed/comments': return False
if comment_link_regex.search(path): return False
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