forked from rDrama/rDrama
fdfd
parent
020277b3c8
commit
86aceaa03a
|
@ -919,6 +919,7 @@ def admin_distinguish_comment(c_id, v):
|
|||
@admin_level_required(6)
|
||||
def refund(v):
|
||||
for u in g.db.query(User).all():
|
||||
if u.id == 253: continue
|
||||
posts=sum([x[0]+x[1]-1 for x in g.db.query(Submission.upvotes, Submission.downvotes).options(lazyload('*')).filter_by(author_id = u.id, is_banned = False, deleted_utc = 0).all()])
|
||||
comments=sum([x[0]+x[1]-1 for x in g.db.query(Comment.upvotes, Comment.downvotes).options(lazyload('*')).filter_by(author_id = u.id, is_banned = False, deleted_utc = 0).all()])
|
||||
u.dramacoins = int(posts+comments)
|
||||
|
|
Loading…
Reference in New Issue