diff --git a/files/classes/submission.py b/files/classes/submission.py index 7f88a0e52b..f6e9ea7600 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -348,6 +348,8 @@ class Submission(Base): def realbody(self, v): if self.club and not (v and (v.paid_dues or v.id == self.author_id)): return f"

{cc} ONLY

" + if not body_html: return "" + body = self.body_html body = censor_slurs(body, v) @@ -375,6 +377,8 @@ class Submission(Base): def plainbody(self, v): if self.club and not (v and (v.paid_dues or v.id == self.author_id)): return f"

{cc} ONLY

" + if not body: return "" + body = self.body body = censor_slurs(body, v) diff --git a/files/helpers/get.py b/files/helpers/get.py index b3c849e74c..3d71194903 100644 --- a/files/helpers/get.py +++ b/files/helpers/get.py @@ -60,7 +60,7 @@ def get_user(username, v=None, graceful=False): UserBlock.target_id == v.id ) ) - ).one_or_none() + ).first() user.is_blocking = block and block.user_id == v.id user.is_blocked = block and block.target_id == v.id