mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
post-new: do not double count
This commit is contained in:
parent
518f165c1f
commit
1d77d42946
1 changed files with 1 additions and 3 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue