Fix scheduled statuses decreasing statuses counts (#16791)
* Add tests * Fix scheduled statuses decreasing statuses counts Fixes #16774
This commit is contained in:
parent
5159ba26e4
commit
216570ad98
3 changed files with 27 additions and 20 deletions
|
@ -74,6 +74,9 @@ class PostStatusService < BaseService
|
|||
status_for_validation = @account.statuses.build(status_attributes)
|
||||
|
||||
if status_for_validation.valid?
|
||||
# Marking the status as destroyed is necessary to prevent the status from being
|
||||
# persisted when the associated media attachments get updated when creating the
|
||||
# scheduled status.
|
||||
status_for_validation.destroy
|
||||
|
||||
# The following transaction block is needed to wrap the UPDATEs to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue