diff --git a/files/classes/comment.py b/files/classes/comment.py index 1b471674a2..5847c29cec 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 324819b56d..0450a87304 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 71429acb35..cea718d26e 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -187,7 +187,7 @@ {% set wager = split_result[4] %} {% endif %} -