From 485735f315545c5bb64fc8b9e412c7b28f6a8b68 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 1 Feb 2022 00:13:16 +0200 Subject: [PATCH] gfd --- files/classes/comment.py | 8 +++----- files/templates/award_modal.html | 4 ++-- files/templates/leaderboard.html | 6 +++--- files/templates/userpage.html | 4 ++-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 22a7fe82b..4207dbd14 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -415,13 +415,11 @@ class Comment(Base): if self.over_18 and not (v and v.over_18) and not (self.post and self.post.over_18): return True - if not v: return False - - if v.filter_words and self.body and any(x in self.body for x in v.filter_words): return True - if self.is_banned: return True - + if path.startswith('/post') and (self.slots_result or self.blackjack_result) and len(self.body) <= 20 and self.level > 1: return True + + if v and v.filter_words and self.body and any(x in self.body for x in v.filter_words): return True return False diff --git a/files/templates/award_modal.html b/files/templates/award_modal.html index d9ab8ad8c..73b8563ca 100644 --- a/files/templates/award_modal.html +++ b/files/templates/award_modal.html @@ -1,4 +1,4 @@ - +