-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Already rendered Email is re-rendered without context #421
Comments
If the context is also just stored and nothing else changed it would be If the context also "can be usefull for admin purposes" it should be saved and Email.message and Email.html_message should be checked for beeing empty. If the context should not be saved the line django-post_office/post_office/models.py Line 108 in dddde78
could simply be replaced by if self.context is not None:
I created a pull request for the latter. |
closes #421 Co-authored-by: Martin Terassa <[email protected]>
This commit creates a problem with emails that have a context, but no template. I get "AttributeError: 'NoneType' object has no attribute 'subject'".
|
In closing #403 a change was made to save the template independent of the render_on_delivery flag. This now causes the email to be re-rendered, however without the context. The result is the empty template message (placeholders are replaced with blank).
Either this should be changed to only re-render if Email.message or Email.html_message is empty, or the context should always be stored, as hinted here on 24 Aug
django-post_office/post_office/models.py
The text was updated successfully, but these errors were encountered: