summaryrefslogtreecommitdiffstats
path: root/app/services/delete_account_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/delete_account_service.rb')
-rw-r--r--app/services/delete_account_service.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/delete_account_service.rb b/app/services/delete_account_service.rb
index 9cb80c95aea..fe9b30b1746 100644
--- a/app/services/delete_account_service.rb
+++ b/app/services/delete_account_service.rb
@@ -122,7 +122,9 @@ class DeleteAccountService < BaseService
@account.polls.reorder(nil).find_each do |poll|
next if @options[:reserve_username] && reported_status_ids.include?(poll.status_id)
- poll.destroy
+ # We can safely delete the poll rather than destroy it, as any non-reported
+ # status should have been deleted already
+ poll.delete
end
associations_for_destruction.each do |association_name|