mirror of
https://github.com/mastodon/mastodon.git
synced 2026-09-29 10:23:33 -05:00
Fix PreviewCardsStatus records not being deleted on account deletion (#40624)
This commit is contained in:
@@ -33,6 +33,9 @@ class BatchedRemoveStatusService < BaseService
|
||||
# cascade the delete faster without loading the associations.
|
||||
statuses_and_reblogs.each_slice(50) { |slice| Status.unscoped.where(id: slice.pluck(:id)).delete_all }
|
||||
|
||||
# TODO: remove later, when we have added appropriate foreign keys
|
||||
PreviewCardsStatus.where(status_id: statuses_and_reblogs.pluck(:id)).in_batches.delete_all
|
||||
|
||||
# Since we skipped all callbacks, we also need to manually
|
||||
# deindex the statuses
|
||||
if Chewy.enabled?
|
||||
|
||||
Reference in New Issue
Block a user