From d80376f2bfb5bc9b9941129090a7e44eb458631c Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 15 May 2023 09:09:45 +0100 Subject: [PATCH] refactor --- app/mailers/bulk_upload_mailer.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/mailers/bulk_upload_mailer.rb b/app/mailers/bulk_upload_mailer.rb index 3ee2dcd92..8ae455b53 100644 --- a/app/mailers/bulk_upload_mailer.rb +++ b/app/mailers/bulk_upload_mailer.rb @@ -29,7 +29,11 @@ class BulkUploadMailer < NotifyMailer def send_check_soft_validations_mail(bulk_upload:) title = "Check your file data" description = "Some of your #{bulk_upload.year_combo} #{bulk_upload.log_type} data might not be right. Click the link below to review the potential errors, and check your file to see if the data is correct." - cta_link = bulk_upload.sales? ? bulk_upload_sales_check_soft_validations_url(bulk_upload, page: "soft-errors-valid") : bulk_upload_lettings_check_soft_validations_url(bulk_upload, page: "soft-errors-valid") + cta_link = if bulk_upload.lettings? + bulk_upload_lettings_check_soft_validations_url(bulk_upload, page: "soft-errors-valid") + else + bulk_upload_sales_check_soft_validations_url(bulk_upload, page: "soft-errors-valid") + end send_email( bulk_upload.user.email,