Skip to content

Commit ccacfb2

Browse files
committed
Fix bug in blueprint's BaseEmail
1 parent 8f72cbf commit ccacfb2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

blueprint/[[app_name]]/emails/base_email.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ def send_later(self, *, via=None, **options):
1111
`MAILERS` (by name). Defaults to the configured default mailer.
1212
"""
1313
self.update(**options)
14+
# Render the template now: the worker only receives the serialized dict,
15+
# so it can no longer render the body. Mirrors `EmailMessage.send()`.
16+
if not self.body:
17+
self._render()
1418
send_email_task(message=self.serialize(), via=via)

0 commit comments

Comments
 (0)