Fix: アカウント削除時エラーが出る問題
This commit is contained in:
parent
428abf33f2
commit
aadde1bbaa
3 changed files with 8 additions and 0 deletions
|
@ -102,6 +102,7 @@ class DeleteAccountService < BaseService
|
|||
record_severed_relationships!
|
||||
distribute_activities!
|
||||
purge_content!
|
||||
remove_ng_rule_history_relations!
|
||||
fulfill_deletion_request!
|
||||
end
|
||||
|
||||
|
@ -273,6 +274,10 @@ class DeleteAccountService < BaseService
|
|||
@account.save!
|
||||
end
|
||||
|
||||
def remove_ng_rule_history_relations!
|
||||
@account.ng_rule_histories.update_all(account_id: Account.representative.id)
|
||||
end
|
||||
|
||||
def fulfill_deletion_request!
|
||||
@account.deletion_request&.destroy
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue