This commit is contained in:
Aevann1 2021-09-23 21:45:11 +02:00
parent f92165e3c9
commit c528ecc7fa
4 changed files with 12 additions and 12 deletions

View file

@ -869,7 +869,8 @@ def toggle_comment_pin(cid, v):
if v.admin_level < 1 and v.id != comment.post.author_id:
abort(403)
comment.is_pinned = not comment.is_pinned
if comment.is_pinned: comment.is_pinned = None
else: comment.is_pinned = v.username
g.db.add(comment)
g.db.flush()