From 6b8baf031d6a67976bb1c3bbac030c9bd652f125 Mon Sep 17 00:00:00 2001 From: Odysseus Chiu Date: Thu, 14 Sep 2023 09:52:36 -0700 Subject: [PATCH] PDF attachment fix --- queue_services/account-mailer/src/account_mailer/config.py | 1 + .../src/account_mailer/email_processors/product_confirmation.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/queue_services/account-mailer/src/account_mailer/config.py b/queue_services/account-mailer/src/account_mailer/config.py index e29afc7301..e487e9a1b1 100644 --- a/queue_services/account-mailer/src/account_mailer/config.py +++ b/queue_services/account-mailer/src/account_mailer/config.py @@ -138,6 +138,7 @@ class _Config(): # pylint: disable=too-few-public-methods AUTH_WEB_TOKEN_CONFIRM_PATH = os.getenv('AUTH_WEB_TOKEN_CONFIRM_PATH') # PAD TOS PDF file name. PAD_TOS_FILE = os.getenv('PAD_TOS_FILE', 'BCROS-Business-Pre-Authorized-Debit-Agreement.pdf') + # MHR QUALIFIED SUPPLIER PDF File name MHR_QS_AGREEMENT_FILE = os.getenv('MHR_QS_AGREEMENT_FILE', 'MHR_QualifiedSuppliersAgreement.pdf') # If any value is present in this flag, starts up a keycloak docker diff --git a/queue_services/account-mailer/src/account_mailer/email_processors/product_confirmation.py b/queue_services/account-mailer/src/account_mailer/email_processors/product_confirmation.py index db8ea3e52d..89dcab4722 100644 --- a/queue_services/account-mailer/src/account_mailer/email_processors/product_confirmation.py +++ b/queue_services/account-mailer/src/account_mailer/email_processors/product_confirmation.py @@ -45,7 +45,7 @@ def process_attachment(email_dict: dict, attachment_type: str) -> dict: def _get_attachment_name(attachment_type: str) -> str: - if attachment_type == AttachmentTypes.QUALIFIED_SUPPLIER: + if attachment_type == AttachmentTypes.QUALIFIED_SUPPLIER.value: return current_app.config['MHR_QS_AGREEMENT_FILE'] return None