forked from rDrama/rDrama
dont count author's own vote
parent
3b01db711d
commit
aece92f70b
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue