From 5204cfaab2a6ea8841f14191f32e84124f4fdafb Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 10 Dec 2021 06:16:53 +0200 Subject: [PATCH] fdsdfs --- files/routes/awards.py | 6 ++++-- files/templates/comments.html | 4 ++-- files/templates/submission.html | 2 +- files/templates/submission_listing.html | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/files/routes/awards.py b/files/routes/awards.py index f0fbae702f..3163bb89de 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -594,7 +594,8 @@ def award_post(pid, v): g.db.add(new_badge) for block in g.db.query(UserBlock).filter_by(target_id=author.id).all(): g.db.delete(block) - post.author.received_award_count += 1 + if post.author.received_award_count: post.author.received_award_count += 1 + else: post.author.received_award_count = 1 g.db.add(post.author) g.db.commit() @@ -749,7 +750,8 @@ def award_comment(cid, v): g.db.add(new_badge) for block in g.db.query(UserBlock).filter_by(target_id=author.id).all(): g.db.delete(block) - c.author.received_award_count += 1 + if c.author.received_award_count: c.author.received_award_count += 1 + else: c.author.received_award_count = 1 g.db.add(c.author) g.db.commit() diff --git a/files/templates/comments.html b/files/templates/comments.html index 0e07fbbd9d..658b7d8021 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -199,7 +199,7 @@ {% if c.over_18 %}+18{% endif %} {% if v and v.admin_level > 1 and c.author.shadowbanned %}{% endif %} {% if c.is_pinned and c.is_pinned.startswith('t:') %} - + {% elif c.is_pinned %} {% endif %} @@ -765,7 +765,7 @@ {% include "expanded_image_modal.html" %} - + - + \ No newline at end of file