")
def user_id(id):
@@ -556,12 +555,12 @@ def u_username(username, v=None):
else: return render_template("userpage_private.html", time=int(time.time()), u=u, v=v)
- if hasattr(u, 'is_blocking') and u.is_blocking and (not v or v.admin_level < 2):
+ if v and hasattr(u, 'is_blocking') and u.is_blocking:
if request.headers.get("Authorization"): return {"error": f"You are blocking @{u.username}."}
else: return render_template("userpage_blocking.html", u=u, v=v)
- if hasattr(u, 'is_blocked') and u.is_blocked and (not v or v.admin_level < 2):
+ if v and v.admin_level < 2 and hasattr(u, 'is_blocked') and u.is_blocked:
if request.headers.get("Authorization"): return {"error": "This person is blocking you."}
else: return render_template("userpage_blocked.html", u=u, v=v)
diff --git a/files/templates/comments.html b/files/templates/comments.html
index 37f98335b..a0f7787e0 100644
--- a/files/templates/comments.html
+++ b/files/templates/comments.html
@@ -207,7 +207,7 @@
{{single_comment(reply, level=level+1)}}
{% endfor %}
- {% elif "notifications" in request.path %}
+ {% elif replies and "notifications" in request.path %}
{% set standalone=False %}
{% for reply in replies %}
@@ -579,7 +579,7 @@
{{single_comment(reply, level=level+1)}}
{% endfor %}
- {% elif "notifications" in request.path %}
+ {% elif replies and "notifications" in request.path %}
{% set standalone=False %}
{% for reply in replies %}
diff --git a/files/templates/emoji_modal.html b/files/templates/emoji_modal.html
index b59cd0c90..410afa1b8 100644
--- a/files/templates/emoji_modal.html
+++ b/files/templates/emoji_modal.html
@@ -1,4 +1,4 @@
-
+