diff options
Diffstat (limited to 'app/services/emails/destroy_service.rb')
-rw-r--r-- | app/services/emails/destroy_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/emails/destroy_service.rb b/app/services/emails/destroy_service.rb index 94e4167d88b..2032f0dc3a9 100644 --- a/app/services/emails/destroy_service.rb +++ b/app/services/emails/destroy_service.rb @@ -1,13 +1,13 @@ module Emails class DestroyService < ::Emails::BaseService def execute - Email.find_by_email(@email).destroy && update_secondary_emails! + Email.find_by_email!(@email).destroy && update_secondary_emails! end private def update_secondary_emails! - result = ::Users::UpdateService.new(@current_user, @current_user).execute do |user| + result = ::Users::UpdateService.new(@current_user).execute do |user| user.update_secondary_emails! end |