From 75d3b2dfd0f1d2fd7729a9c7fa54b559de63b91d Mon Sep 17 00:00:00 2001 From: KMY Date: Wed, 9 Oct 2024 20:25:30 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"Fix:=20=E3=82=A2=E3=82=AB=E3=82=A6?= =?UTF-8?q?=E3=83=B3=E3=83=88=E5=89=8A=E9=99=A4=E6=99=82=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=81=8C=E5=87=BA=E3=82=8B=E5=95=8F=E9=A1=8C"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit aadde1bbaa0922058e9a79d0d0eb71b26ef7e94b. --- app/models/concerns/account/associations.rb | 1 - app/services/delete_account_service.rb | 5 ----- spec/services/delete_account_service_spec.rb | 2 -- 3 files changed, 8 deletions(-) diff --git a/app/models/concerns/account/associations.rb b/app/models/concerns/account/associations.rb index ec8766f709..3040da01de 100644 --- a/app/models/concerns/account/associations.rb +++ b/app/models/concerns/account/associations.rb @@ -19,7 +19,6 @@ module Account::Associations has_many :conversations, class_name: 'AccountConversation', dependent: :destroy, inverse_of: :account has_many :scheduled_statuses, inverse_of: :account, dependent: :destroy has_many :scheduled_expiration_statuses, inverse_of: :account, dependent: :destroy - has_many :ng_rule_histories, inverse_of: :account, dependent: :destroy # Notifications has_many :notifications, inverse_of: :account, dependent: :destroy diff --git a/app/services/delete_account_service.rb b/app/services/delete_account_service.rb index 69fa2111a0..0c90eeb82d 100644 --- a/app/services/delete_account_service.rb +++ b/app/services/delete_account_service.rb @@ -102,7 +102,6 @@ class DeleteAccountService < BaseService record_severed_relationships! distribute_activities! purge_content! - remove_ng_rule_history_relations! fulfill_deletion_request! end @@ -274,10 +273,6 @@ 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 diff --git a/spec/services/delete_account_service_spec.rb b/spec/services/delete_account_service_spec.rb index 0e978c7b11..9055dc8819 100644 --- a/spec/services/delete_account_service_spec.rb +++ b/spec/services/delete_account_service_spec.rb @@ -83,8 +83,6 @@ RSpec.describe DeleteAccountService do expect { pending_follow_request.reload }.to raise_error(ActiveRecord::RecordNotFound) expect { pending_status.reload }.to raise_error(ActiveRecord::RecordNotFound) expect { fetchable_pending_status.reload }.to raise_error(ActiveRecord::RecordNotFound) - - expect(ng_rule_history.account_id).to eq Account.representative.id end def expect_deletion_of_associated_owned_records