Update fix-duplicates maintenance task (#17731)
* Update fix-duplicates task to 2022_02_10_153119 Also add support for Appeal to AccountMerging#merge_with! * Update fix-duplicates task to 2022_03_07_094650 * Update fix-duplicates task to 2022_03_09_213005 * Update fix-duplicates task to 2022_03_07_083603 * Update fix-duplicates task to 2022_03_10_060626 * Update fix-duplicates script to 2022_03_07_083603 * Update fix-duplicates task to 2022_03_10_060706 * Update fix-duplicates task to 2022_03_10_060959 * Silence CodeClimate
This commit is contained in:
@ -15,7 +15,8 @@ module AccountMerging
|
||||
Status, StatusPin, MediaAttachment, Poll, Report, Tombstone, Favourite,
|
||||
Follow, FollowRequest, Block, Mute,
|
||||
AccountModerationNote, AccountPin, AccountStat, ListAccount,
|
||||
PollVote, Mention, AccountDeletionRequest, AccountNote, FollowRecommendationSuppression
|
||||
PollVote, Mention, AccountDeletionRequest, AccountNote, FollowRecommendationSuppression,
|
||||
Appeal
|
||||
]
|
||||
|
||||
owned_classes.each do |klass|
|
||||
@ -47,6 +48,10 @@ module AccountMerging
|
||||
record.update_attribute(:reference_account_id, id)
|
||||
end
|
||||
|
||||
Appeal.where(account_warning_id: other_account.id).find_each do |record|
|
||||
record.update_attribute(:account_warning_id, id)
|
||||
end
|
||||
|
||||
# Some follow relationships have moved, so the cache is stale
|
||||
Rails.cache.delete_matched("followers_hash:#{id}:*")
|
||||
Rails.cache.delete_matched("relationships:#{id}:*")
|
||||
|
Reference in New Issue
Block a user