FIX: Update draft count when sequence is increased (#13940)

* FIX: Update draft count when sequence is increased

Sometimes users ended up having a draft count higher than the actual
number of drafts.

* FIX: Do not update draft count twice

The call to DraftSequence.next! above already does it.
This commit is contained in:
Bianca Nenciu
2021-08-04 13:30:37 +03:00
committed by GitHub
parent e2af2a2219
commit d9843d757a
4 changed files with 14 additions and 2 deletions

View File

@@ -229,7 +229,6 @@ class PostCreator
@post.topic.reload
publish
UserStat.update_draft_count(@user.id)
track_latest_on_category
enqueue_jobs unless @opts[:skip_jobs]