From 9b881a51cb348ed23c07b146502dc3ef4e9a80e8 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Thu, 9 Nov 2023 12:34:57 +0100 Subject: [PATCH] Rename tender reminder email to siae --- config/settings/base.py | 16 ++++++++-------- lemarche/www/tenders/tasks.py | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/settings/base.py b/config/settings/base.py index 1f60ee0a8..42a43f5ff 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -352,17 +352,17 @@ # -- tender: siae & partners MAILJET_TENDERS_SIAE_PRESENTATION_TEMPLATE_ID = env.int("MAILJET_TENDERS_SIAE_PRESENTATION_TEMPLATE_ID", 3679205) MAILJET_TENDERS_PARTNER_PRESENTATION_TEMPLATE_ID = env.int("MAILJET_TENDERS_PARTNER_PRESENTATION_TEMPLATE_ID", 3868179) -MAILJET_TENDERS_CONTACTED_REMINDER_2D_TEMPLATE_ID = env.int( - "MAILJET_TENDERS_CONTACTED_REMINDER_2D_TEMPLATE_ID", 4716371 +MAILJET_TENDERS_SIAE_CONTACTED_REMINDER_2D_TEMPLATE_ID = env.int( + "MAILJET_TENDERS_SIAE_CONTACTED_REMINDER_2D_TEMPLATE_ID", 4716371 ) -MAILJET_TENDERS_CONTACTED_REMINDER_3D_TEMPLATE_ID = env.int( - "MAILJET_TENDERS_CONTACTED_REMINDER_3D_TEMPLATE_ID", 4716387 +MAILJET_TENDERS_SIAE_CONTACTED_REMINDER_3D_TEMPLATE_ID = env.int( + "MAILJET_TENDERS_SIAE_CONTACTED_REMINDER_3D_TEMPLATE_ID", 4716387 ) -MAILJET_TENDERS_CONTACTED_REMINDER_4D_TEMPLATE_ID = env.int( - "MAILJET_TENDERS_CONTACTED_REMINDER_4D_TEMPLATE_ID", 4716426 +MAILJET_TENDERS_SIAE_CONTACTED_REMINDER_4D_TEMPLATE_ID = env.int( + "MAILJET_TENDERS_SIAE_CONTACTED_REMINDER_4D_TEMPLATE_ID", 4716426 ) -MAILJET_TENDERS_INTERESTED_REMINDER_2D_TEMPLATE_ID = env.int( - "MAILJET_TENDERS_INTERESTED_REMINDER_2D_TEMPLATE_ID", 4744896 +MAILJET_TENDERS_SIAE_INTERESTED_REMINDER_2D_TEMPLATE_ID = env.int( + "MAILJET_TENDERS_SIAE_INTERESTED_REMINDER_2D_TEMPLATE_ID", 4744896 ) # -- tender: author MAILJET_TENDERS_AUTHOR_CONFIRMATION_VALIDATED_TEMPLATE_ID = env.int( diff --git a/lemarche/www/tenders/tasks.py b/lemarche/www/tenders/tasks.py index d63d2728b..f7025a210 100644 --- a/lemarche/www/tenders/tasks.py +++ b/lemarche/www/tenders/tasks.py @@ -156,13 +156,13 @@ def send_tender_contacted_reminder_email_to_siaes( ): if days_since_email_send_date == 2: email_subject = f"Un {tender.get_kind_display().lower()} pour vous sur le Marché de l'inclusion" - template_id = settings.MAILJET_TENDERS_CONTACTED_REMINDER_2D_TEMPLATE_ID + template_id = settings.MAILJET_TENDERS_SIAE_CONTACTED_REMINDER_2D_TEMPLATE_ID elif days_since_email_send_date == 3: email_subject = f"Avez vous consulté le {tender.get_kind_display().lower()} ?" - template_id = settings.MAILJET_TENDERS_CONTACTED_REMINDER_3D_TEMPLATE_ID + template_id = settings.MAILJET_TENDERS_SIAE_CONTACTED_REMINDER_3D_TEMPLATE_ID elif days_since_email_send_date == 4: email_subject = f"L'opportunité : {tender.get_kind_display().lower()} a besoin de votre réponse !" - template_id = settings.MAILJET_TENDERS_CONTACTED_REMINDER_4D_TEMPLATE_ID + template_id = settings.MAILJET_TENDERS_SIAE_CONTACTED_REMINDER_4D_TEMPLATE_ID else: error_message = f"send_tender_contacted_reminder_email_to_siaes: days_since_email_send_date has a non-managed value ({days_since_email_send_date})" # noqa raise Exception(error_message) @@ -291,7 +291,7 @@ def send_tender_interested_reminder_email_to_siae( } api_mailjet.send_transactional_email_with_template( - template_id=settings.MAILJET_TENDERS_INTERESTED_REMINDER_2D_TEMPLATE_ID, + template_id=settings.MAILJET_TENDERS_SIAE_INTERESTED_REMINDER_2D_TEMPLATE_ID, subject=email_subject, recipient_email=recipient_email, recipient_name=recipient_name,