diff --git a/core/app/services/uffizzi_core/migrations/account_service.rb b/core/app/services/uffizzi_core/migrations/account_service.rb index 63c92d59..c73020d0 100644 --- a/core/app/services/uffizzi_core/migrations/account_service.rb +++ b/core/app/services/uffizzi_core/migrations/account_service.rb @@ -3,10 +3,7 @@ class UffizziCore::Migrations::AccountService class << self def remove_draft_accounts - UffizziCore::Account.where(state: 'draft').find_each do |account| - account.owner.destroy - account.destroy - end + UffizziCore::Account.where(state: 'draft').find_each(&:destroy) end end end