From d25ce99e22310bc35fb3b80527dea46240025b2c Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk Date: Wed, 8 May 2024 23:41:28 -0700 Subject: [PATCH] do not send email notification when submissions are archived reapply fix for #190 f0d101bfa888c714b71062e68862c722f82a5072 --- .../services/submission_process/submission_processor.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/ontologies_linked_data/services/submission_process/submission_processor.rb b/lib/ontologies_linked_data/services/submission_process/submission_processor.rb index cd18d659..731959d6 100644 --- a/lib/ontologies_linked_data/services/submission_process/submission_processor.rb +++ b/lib/ontologies_linked_data/services/submission_process/submission_processor.rb @@ -80,11 +80,9 @@ def process_submission(logger, options = {}) end def notify_submission_processed(logger) - begin - LinkedData::Utils::Notifications.submission_processed(@submission) unless archive - rescue StandardError => e - logger.error("Email sending failed: #{e.message}\n#{e.backtrace.join("\n\t")}"); logger.flush - end + LinkedData::Utils::Notifications.submission_processed(@submission) unless @submission.archived? + rescue StandardError => e + logger.error("Email sending failed: #{e.message}\n#{e.backtrace.join("\n\t")}"); logger.flush end def get_options(options)