minor /move fix

master
Aevann 2022-12-25 07:50:31 +02:00
parent b0430f82e7
commit 2f48039a4b
1 changed files with 4 additions and 3 deletions

View File

@ -47,13 +47,10 @@ def _moveacc(old_id, new_id):
'coins',
'coins_spent',
'coins_spent_on_hats',
'comment_count',
'currently_held_lottery_tickets',
'lootboxes_bought',
'marseybux',
'post_count',
'received_award_count',
'stored_subscriber_count',
'total_held_lottery_tickets',
'total_lottery_winnings',
'truescore',
@ -64,6 +61,10 @@ def _moveacc(old_id, new_id):
setattr(newuser, attr, amount)
setattr(olduser, attr, 0)
newuser.stored_subscriber_count = db.query(Follow).filter_by(target_id=newuser.id).count()
newuser.post_count = db.query(Submission).filter_by(author_id=newuser.id).count()
newuser.comment_count = db.query(Comment).filter_by(author_id=newuser.id).count()
if newuser.created_utc > olduser.created_utc:
newuser.created_utc = olduser.created_utc