* Fix: アカウント削除時エラーが出る問題 * nilに変更 * 削除するタイミングと条件を調整 * Fix test
This commit is contained in:
parent
154cda812e
commit
141ed8b171
2 changed files with 6 additions and 0 deletions
|
@ -170,6 +170,7 @@ class DeleteAccountService < BaseService
|
|||
purge_feeds!
|
||||
purge_other_associations!
|
||||
|
||||
remove_ng_rule_history_relations! unless keep_account_record?
|
||||
@account.destroy unless keep_account_record?
|
||||
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: nil)
|
||||
end
|
||||
|
||||
def fulfill_deletion_request!
|
||||
@account.deletion_request&.destroy
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue