fix 500 error

master
Aevann 2024-04-01 01:16:09 +02:00
parent 03d5dc3a0e
commit 199a6c794f
2 changed files with 4 additions and 1 deletions

View File

@ -781,8 +781,9 @@ def admin_distinguish_comment(c_id, v):
user_id=v.id,
target_comment_id=comment.id
)
if cls == HoleAction:
ma.hole = comment.post.hole
g.db.add(ma)
if comment.distinguished: return {"message": "Comment distinguished!"}
else: return {"message": "Comment undistinguished!"}

View File

@ -1215,6 +1215,8 @@ def distinguish_post(post_id, v):
user_id=v.id,
target_post_id=post.id
)
if cls == HoleAction:
ma.hole = post.hole
g.db.add(ma)