diff --git a/files/classes/comment.py b/files/classes/comment.py
index 5972622d3..7c22e71f3 100644
--- a/files/classes/comment.py
+++ b/files/classes/comment.py
@@ -17,7 +17,6 @@ from files.helpers.sorting_and_time import *
def normalize_urls_runtime(body, v):
- if not v: return body
if v.reddit != 'old.reddit.com':
body = reddit_to_vreddit_regex.sub(rf'\1https://{v.reddit}/\2/', body)
if v.nitter:
@@ -252,7 +251,7 @@ class Comment(Base):
if body:
body = censor_slurs(body, v)
body = normalize_urls_runtime(body, v)
- if not v or v.controversial:
+ if v.controversial:
captured = []
for i in controversial_regex.finditer(body):
if i.group(1) in captured: continue
diff --git a/files/classes/submission.py b/files/classes/submission.py
index 6f895f7d5..fb54897ba 100644
--- a/files/classes/submission.py
+++ b/files/classes/submission.py
@@ -244,7 +244,7 @@ class Submission(Base):
if url.startswith("https://old.reddit.com/r/") and '/comments/' in url and "sort=" not in url:
if "?" in url: url += "&context=9"
else: url += "?context=8"
- if not v or v.controversial: url += "&sort=controversial"
+ if v.controversial: url += "&sort=controversial"
elif url.startswith("https://watchpeopledie.tv/videos/"):
# Semi-temporary fix for self-hosted unproxied video serving
url = url.replace("https://watchpeopledie.tv/videos/",
diff --git a/files/templates/comments.html b/files/templates/comments.html
index 2cbe1c8d8..061ecef05 100644
--- a/files/templates/comments.html
+++ b/files/templates/comments.html
@@ -806,19 +806,17 @@
{% if v %}
+ {% if v.admin_level >= PERMS['POST_COMMENT_MODERATION_TOOLS_VISIBLE'] %}
+
+ {% endif %}
{% endif %}
-
- {% if v and v.admin_level >= PERMS['POST_COMMENT_MODERATION_TOOLS_VISIBLE'] %}
-
- {% endif %}
-
{% endif %}
-