mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
recalculate_post_stats when viewing profile
This commit is contained in:
parent
8b52d33739
commit
b3ef7cc106
1 changed files with 2 additions and 0 deletions
|
@ -78,6 +78,8 @@ def show_profile(user):
|
||||||
# profile info
|
# profile info
|
||||||
canonical = user.ap_public_url if user.ap_public_url else None
|
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
|
description = shorten_string(markdown_to_text(user.about), 150) if user.about else None
|
||||||
|
user.recalculate_post_stats()
|
||||||
|
db.session.commit()
|
||||||
|
|
||||||
# pagination urls
|
# 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,
|
post_next_url = url_for('activitypub.user_profile', actor=user.ap_id if user.ap_id is not None else user.user_name,
|
||||||
|
|
Loading…
Add table
Reference in a new issue