Skip to content

Commit

Permalink
Fix: Already rendered Email is re-rendered without context
Browse files Browse the repository at this point in the history
closes ui#421
  • Loading branch information
Martin Terassa committed Oct 18, 2022
1 parent 759f3b5 commit 29ab953
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion post_office/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def prepare_email_message(self):
if get_override_recipients():
self.to = get_override_recipients()

if self.template is not None:
if self.context is not None:
engine = get_template_engine()
subject = engine.from_string(self.template.subject).render(self.context)
plaintext_message = engine.from_string(self.template.content).render(self.context)
Expand Down

0 comments on commit 29ab953

Please sign in to comment.