From 2f48039a4b1ba9551235ad879bf4f60225a84159 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 25 Dec 2022 07:50:31 +0200 Subject: [PATCH] minor /move fix --- files/routes/admin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 2628f48fb..74f75dc08 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -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