Fixed error when viewing a missing post

This commit is contained in:
Jaakko Keränen 2024-01-15 13:18:54 +02:00
parent b7b312e32d
commit f15906873f
No known key found for this signature in database
GPG Key ID: BACCFCFB98DB2EDC
1 changed files with 1 additions and 1 deletions

View File

@ -366,9 +366,9 @@ def make_post_page(session, post):
focused_cmt = post
post_id = post.parent
post = db.get_post(id=post_id)
session.get_mods(post.subspace)
page += f'# Comment by {focused_cmt.poster_avatar} {focused_cmt.poster_name}\n\n'
if post:
session.get_mods(post.subspace)
page += f'=> {post.page_url()} Re: {post.quoted_title()}\n'
sub_name = ("u/" if post.sub_owner else "s/") + post.sub_name
page += f'=> /{sub_name} In: {sub_name}\n\n'