From f9261d840bce3951ab3ef03bf2c0504ab44d44b2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 14 Dec 2021 00:49:20 +0200 Subject: [PATCH 1/4] fdsfd --- files/helpers/wrappers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index df250b7be..ad1e4db5f 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -49,7 +49,7 @@ def auth_desired(f): if request.host == 'old.rdrama.net' and not (v and v.admin_level): if request.headers.get("Authorization"): return {"error": "403 Forbidden"}, 403 - else: return render_template('errors/403.html', v=v), 403 + else: return render_template('errors/403.html', v=v), 403 check_ban_evade(v) resp = make_response(f(*args, v=v, **kwargs)) From ee3526d78edd0b94013cec25f66052df00d19e4f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 14 Dec 2021 02:50:49 +0200 Subject: [PATCH 2/4] fsdfsd --- files/classes/comment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index d98f44183..ac44d2253 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -242,7 +242,7 @@ class Comment(Base): 'permalink': self.permalink, 'is_pinned': self.is_pinned, 'distinguish_level': self.distinguish_level, - 'post_id': self.post.id, + 'post_id': self.post.id if self.post else None, 'score': self.score, 'upvotes': self.upvotes, 'downvotes': self.downvotes, From 8dc03b10a659c8c831901212109b0af079003fe9 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 14 Dec 2021 02:51:04 +0200 Subject: [PATCH 3/4] fdsfds --- files/classes/comment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index ac44d2253..d8facb88b 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -242,7 +242,7 @@ class Comment(Base): 'permalink': self.permalink, 'is_pinned': self.is_pinned, 'distinguish_level': self.distinguish_level, - 'post_id': self.post.id if self.post else None, + 'post_id': self.post.id if self.post else 0, 'score': self.score, 'upvotes': self.upvotes, 'downvotes': self.downvotes, From e3f2eccf8ae8e1b6358c1f34a1743afb340c29b2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 14 Dec 2021 02:54:19 +0200 Subject: [PATCH 4/4] fsdfds --- files/classes/submission.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/classes/submission.py b/files/classes/submission.py index 681ba8d8e..731df7acd 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -229,7 +229,7 @@ class Submission(Base): flags = {} for f in self.flags: flags[f.user.username] = f.reason - data = {'author_name': self.author.username, + data = {'author_name': self.author.username if self.author else '', 'permalink': self.permalink, 'is_banned': bool(self.is_banned), 'deleted_utc': self.deleted_utc,