From 6cea7a9ddca65ec0c89bfa65e9b20332772dde73 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 3 Feb 2022 10:03:05 +0200 Subject: [PATCH] sfd --- files/classes/comment.py | 2 +- files/routes/front.py | 2 +- files/templates/comments.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 1b471674a..5847c29ce 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -417,7 +417,7 @@ class Comment(Base): if self.is_banned: return True - if path.startswith('/post') and (self.slots_result or self.blackjack_result) and (not self.body or len(self.body) <= 20) and self.level > 1: return True + if path.startswith('/post') and (self.slots_result or self.blackjack_result) and (not self.body or 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 diff --git a/files/routes/front.py b/files/routes/front.py index 324819b56..0450a8730 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -186,7 +186,7 @@ def front_all(v): posts = get_posts(ids, v=v) - if v.hidevotedon: posts = [x for x in posts if not hasattr(x, 'voted') or not x.voted] + if v and v.hidevotedon: posts = [x for x in posts if not hasattr(x, 'voted') or not x.voted] if request.headers.get("Authorization"): return {"data": [x.json for x in posts], "next_exists": next_exists} return render_template("home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page, ccmode=ccmode) diff --git a/files/templates/comments.html b/files/templates/comments.html index 71429acb3..cea718d26 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -187,7 +187,7 @@ {% set wager = split_result[4] %} {% endif %} -
+
{% if not isreply %} {% endif %}