From a3fc1b3fa7ccc501c074fddf8faade273862e99e Mon Sep 17 00:00:00 2001 From: Simran Mattu Date: Mon, 30 Dec 2024 15:49:47 +0000 Subject: [PATCH] Corrected the email bodies when automatically sending emails --- woudc_data_registry/controller.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/woudc_data_registry/controller.py b/woudc_data_registry/controller.py index ea3a6b3..cabfaa1 100644 --- a/woudc_data_registry/controller.py +++ b/woudc_data_registry/controller.py @@ -144,7 +144,6 @@ def orchestrate(source, working_dir, metadata_only=False, p = Process(registry, search_engine, op_report) data_record = p.validate(extcsv, bypass=bypass, metadata_only=metadata_only) - if data_record is None: click.echo('Not ingesting') failed.append(file_to_process) @@ -159,7 +158,6 @@ def orchestrate(source, working_dir, metadata_only=False, data_record.get_waf_path(config.WDR_WAF_BASEURL) data_record.output_filepath = \ data_record.get_waf_path(config.WDR_WAF_BASEDIR) - if verify_only: click.echo('Verified but not ingested') else: @@ -294,7 +292,7 @@ def send_feedback(ctx, failed_files, test, ops): for contributor in template_collection: acronym = contributor[0].split(' ')[0].lower() - message = message.replace( + specific_message = message.replace( "$EMAIL_SUMMARY", "\n".join(contributor[1:])) specific_subject = subject.replace('contributor_acronym', acronym) @@ -307,7 +305,7 @@ def send_feedback(ctx, failed_files, test, ops): acronym, to_email_addresses ) send_email( - message, subject, from_email_address, + specific_message, subject, from_email_address, to_email_addresses, host, port, cc_addresses, bcc_addresses ) @@ -320,7 +318,7 @@ def send_feedback(ctx, failed_files, test, ops): acronym, to_email_addresses ) send_email( - message, specific_subject, from_email_address, + specific_message, specific_subject, from_email_address, to_email_addresses, host, port, cc_addresses, bcc_addresses )