From 1d77d42946b4e3b26a84b58badd94834c3010d2e Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:55:39 +1300 Subject: [PATCH] post-new: do not double count --- app/community/routes.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/community/routes.py b/app/community/routes.py index b037e408..ebafeff4 100644 --- a/app/community/routes.py +++ b/app/community/routes.py @@ -698,10 +698,8 @@ def add_post(actor, type): # todo: add try..except post = Post.new(current_user, community, request_json) - community.post_count += 1 - current_user.post_count += 1 current_user.language_id = form.language_id.data - community.last_active = g.site.last_active = utcnow() + g.site.last_active = utcnow() post.ap_id = f"https://{current_app.config['SERVER_NAME']}/post/{post.id}" db.session.commit()