mirror of
https://github.com/discourse/discourse.git
synced 2026-09-05 04:40:41 -05:00
FIX: Update draft count after creating a post (#13884)
When a post is created, the draft sequence is increased and then older drafts are automatically executing a raw SQL query. This skipped the Draft model callbacks and did not update user's draft count. I fixed another problem related to a raw SQL query from Draft.cleanup! method.
This commit is contained in:
@@ -229,6 +229,7 @@ class PostCreator
|
||||
@post.topic.reload
|
||||
|
||||
publish
|
||||
UserStat.update_draft_count(@user.id)
|
||||
|
||||
track_latest_on_category
|
||||
enqueue_jobs unless @opts[:skip_jobs]
|
||||
|
||||
Reference in New Issue
Block a user