diff --git a/files/routes/comments.py b/files/routes/comments.py index 83fb97502..d5bc9638c 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -396,7 +396,7 @@ def delete_comment(cid, v): c.deleted_utc = int(time.time()) g.db.add(c) - c.author.truescore -= c.upvotes + c.downvotes + c.author.truescore -= c.upvotes + c.downvotes - 1 g.db.add(c.author) if c.pinned: @@ -435,7 +435,7 @@ def undelete_comment(cid, v): c.deleted_utc = 0 g.db.add(c) - c.author.truescore += c.upvotes + c.downvotes + c.author.truescore += c.upvotes + c.downvotes - 1 g.db.add(c.author) if not (c.parent_post in ADMIGGER_THREADS and c.level == 1): diff --git a/files/routes/posts.py b/files/routes/posts.py index 310e019e0..4d5ca4151 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -760,7 +760,7 @@ def delete_post_pid(pid, v): g.db.add(p) - p.author.truescore -= p.upvotes + p.downvotes + p.author.truescore -= p.upvotes + p.downvotes - 1 g.db.add(p.author) cache.delete_memoized(frontlist) @@ -788,7 +788,7 @@ def undelete_post_pid(pid, v): p.deleted_utc = 0 g.db.add(p) - p.author.truescore += p.upvotes + p.downvotes + p.author.truescore += p.upvotes + p.downvotes - 1 g.db.add(p.author) cache.delete_memoized(frontlist)