-
Notifications
You must be signed in to change notification settings - Fork 278
Open
Description
Description
Currently, in the get_template method in post_office/mail.py (around line 200), if a translation lookup fails, the entire operation may fail or throw an exception.
Proposed Solution
We should wrap the template retrieval logic in a try/catch block so that if we don't have a translation for the requested language, we gracefully fall back to the original email template instead of failing completely.
File Reference
django-post_office/post_office/mail.py
Line 200 in 99be3b5
| if isinstance(template, EmailTemplate): |
Benefits
- Improved robustness and reliability of the email system
- Graceful degradation when translations are unavailable
- Better user experience by always sending emails, even if translation fails
- Prevents application crashes due to missing language translations
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels