Skip to content

Commit

Permalink
Merge branch 'main' into sms-project-starting-notification
Browse files Browse the repository at this point in the history
  • Loading branch information
djamg committed Sep 27, 2023
1 parent 91b167a commit 1c48e03
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion funnel/models/notification_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class ProjectStartingNotification(


class ProjectTomorrowNotification(
DocumentHasProfile,
DocumentHasAccount,
Notification[Project, Optional[Session]],
type='project_tomorrow',
shadows=ProjectStartingNotification,
Expand Down
2 changes: 1 addition & 1 deletion funnel/views/notifications/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import grapheme

from ...models import Account, Project
from ...models import Account, Project, Venue

_T = TypeVar('_T') # Host type for SetVar
_I = TypeVar('_I') # Input type for SetVar's setter
Expand Down
8 changes: 2 additions & 6 deletions funnel/views/notifications/project_starting_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

from __future__ import annotations

from typing import Union

from flask import render_template

from baseframe import _, __
Expand All @@ -12,8 +10,8 @@
from ...models import (
Project,
ProjectStartingNotification,
Session,
ProjectTomorrowNotification,
Session,
)
from ...transports.sms import SmsPriority, SmsTemplate
from ..helpers import shortlink
Expand Down Expand Up @@ -152,9 +150,7 @@ def email_content(self) -> str:

def sms( # type: ignore[override]
self,
) -> Union[
ProjectStartingTomorrowVenueTemplate, ProjectStartingTomorrowLocationTemplate
]:
) -> ProjectStartingTomorrowVenueTemplate | ProjectStartingTomorrowLocationTemplate:
venue = self.project.primary_venue
if venue is not None:
return ProjectStartingTomorrowVenueTemplate(
Expand Down

0 comments on commit 1c48e03

Please sign in to comment.