fix 500 error

master
Aevann 2023-02-10 15:45:36 +02:00
parent c4953d924e
commit e243458338
1 changed files with 2 additions and 1 deletions

View File

@ -166,7 +166,8 @@ def post_id(pid, anything=None, v=None, sub=None):
post.views += 1
g.db.add(post)
y, output = get_comments_v_properties(v, True, None, Comment.top_comment_id.in_(ids), Comment.level < 10)
if v:
y, output = get_comments_v_properties(v, True, None, Comment.top_comment_id.in_(ids), Comment.level < 10)
if v and v.client:
return post.json(g.db)