From b3ef7cc106615314541f19880ce8ec1c98f505b5 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Tue, 17 Sep 2024 09:47:31 +1200 Subject: [PATCH] recalculate_post_stats when viewing profile --- app/user/routes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/user/routes.py b/app/user/routes.py index 1c20449c..0aa16a31 100644 --- a/app/user/routes.py +++ b/app/user/routes.py @@ -78,6 +78,8 @@ def show_profile(user): # profile info canonical = user.ap_public_url if user.ap_public_url else None description = shorten_string(markdown_to_text(user.about), 150) if user.about else None + user.recalculate_post_stats() + db.session.commit() # pagination urls post_next_url = url_for('activitypub.user_profile', actor=user.ap_id if user.ap_id is not None else user.user_name,