Skip to content

Commit

Permalink
Update __init__.py (#409)
Browse files Browse the repository at this point in the history
I realized most time the images are not been attached and it has been giving error
  • Loading branch information
codertjay authored Aug 25, 2022
1 parent a46c65d commit 59d320d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion post_office/template/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ def render_to_string(template_name, context=None, request=None, using=None):
template = select_template(template_name, using=using)
else:
template = get_template(template_name, using=using)
return template.render(context, request), template.template._attached_images
try:
return template.render(context, request), template.template._attached_images
except Exception as a:
return template.render(context, request)

0 comments on commit 59d320d

Please sign in to comment.