forked from CGM_Public/pretix_original
Add unit tests for our mail API
This commit is contained in:
@@ -484,7 +484,7 @@ class Event(Versionable):
|
||||
return EventRelatedCache(self)
|
||||
|
||||
@cached_property
|
||||
def settings(self):
|
||||
def settings(self) -> SettingsProxy:
|
||||
"""
|
||||
Returns an object representing this event's settings
|
||||
"""
|
||||
|
||||
@@ -37,7 +37,7 @@ def mail(user: User, subject: str, template: str, context: dict, event: Event=No
|
||||
sender = event.settings.get('mail_from') if event else settings.MAIL_FROM
|
||||
|
||||
email = EmailMessage(
|
||||
subject, body, sender,
|
||||
str(subject), body, sender,
|
||||
to=[user.email]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user