merge and lint

This commit is contained in:
Rachid Mrad 2024-02-22 20:58:22 -05:00
commit ec311b89cf
No known key found for this signature in database
12 changed files with 749 additions and 132 deletions

View file

@ -15,7 +15,7 @@ class EmailSendingError(RuntimeError):
pass
def send_templated_email(template_name: str, subject_template_name: str, to_address: str, bcc_address='', context={}):
def send_templated_email(template_name: str, subject_template_name: str, to_address: str, bcc_address="", context={}):
"""Send an email built from a template to one email address.
template_name and subject_template_name are relative to the same template
@ -39,7 +39,7 @@ def send_templated_email(template_name: str, subject_template_name: str, to_addr
)
except Exception as exc:
raise EmailSendingError("Could not access the SES client.") from exc
destination = {"ToAddresses": [to_address]}
if bcc_address:
destination["BccAddresses"] = [bcc_address]