From 80f0c7a4c8865ac3cd919959c5b4e6c83076ce47 Mon Sep 17 00:00:00 2001 From: Aleksey Stepanov Date: Mon, 5 Dec 2022 17:37:48 +0400 Subject: [PATCH] [#330] removed deleting account owner from UffizziCore::Migrations::AccountService.remove_draft_accounts --- core/app/services/uffizzi_core/migrations/account_service.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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