From 04fd102c93f726e5d71111d9234ad6718fdcbc8a Mon Sep 17 00:00:00 2001 From: Amogh M Aradhya Date: Wed, 27 Sep 2023 16:59:01 +0530 Subject: [PATCH] Fixed email template --- funnel/cli/periodic/notification.py | 2 +- .../notifications/project_tomorrow_email.html.jinja2 | 2 +- funnel/views/notifications/project_starting_notification.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/funnel/cli/periodic/notification.py b/funnel/cli/periodic/notification.py index 5fedb23a9..0e5437a71 100644 --- a/funnel/cli/periodic/notification.py +++ b/funnel/cli/periodic/notification.py @@ -69,7 +69,7 @@ def project_starting_tomorrow_alert() -> None: .all() ): dispatch_notification( - models.ProjectStartingNotification( + models.ProjectTomorrowNotification( document=project, fragment=project.next_session_from(start_time), ) diff --git a/funnel/templates/notifications/project_tomorrow_email.html.jinja2 b/funnel/templates/notifications/project_tomorrow_email.html.jinja2 index 21716f57a..2ab477683 100644 --- a/funnel/templates/notifications/project_tomorrow_email.html.jinja2 +++ b/funnel/templates/notifications/project_tomorrow_email.html.jinja2 @@ -4,7 +4,7 @@ -

{%- trans project=view.project.joined_title, start_datetime=(view.session or view.project).start_at_localized|datetime, venue=project.primary_venue.title -%}{{ project }} has an in-person session at {{ venue }}, starting {{ start_datetime }}{%- endtrans -%}

+

{%- trans project=view.project.joined_title, start_datetime=(view.session or view.project).start_at_localized|datetime, venue=view.project.primary_venue.title -%}{{ project }} has an in-person session at {{ venue }}, starting {{ start_datetime }}{%- endtrans -%}


diff --git a/funnel/views/notifications/project_starting_notification.py b/funnel/views/notifications/project_starting_notification.py index 1603b26b8..b7ffb3555 100644 --- a/funnel/views/notifications/project_starting_notification.py +++ b/funnel/views/notifications/project_starting_notification.py @@ -154,7 +154,7 @@ def sms( # type: ignore[override] venue = self.project.primary_venue if venue is not None: return ProjectStartingTomorrowVenueTemplate( - project=self.project, + account=self.project.account, venue=venue, url=shortlink( self.project.url_for(_external=True, **self.tracking_tags('sms')), @@ -162,7 +162,7 @@ def sms( # type: ignore[override] ), ) return ProjectStartingTomorrowLocationTemplate( - project=self.project, + account=self.project.account, location=self.project.location, url=shortlink( self.project.url_for(_external=True, **self.tracking_tags('sms')),