Commit 32ac987e authored by Developer's avatar Developer

Updated SuspendAccountService to resolve outstanding reports on suspend

• Updated:
- SuspendAccountService to resolve outstanding reports on suspend
parent b7d6d5f1
......@@ -51,6 +51,7 @@ class SuspendAccountService < BaseService
purge_user!
purge_profile!
purge_content!
resolve_reports!
end
private
......@@ -99,6 +100,10 @@ class SuspendAccountService < BaseService
@account.save!
end
def resolve_reports!
Report.where(target_account: @account).unresolved.update_all(action_taken: true) unless @options[:destroy]
end
def destroy_all(association)
association.in_batches.destroy_all
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment