ui / django-post_office

A Django app that allows you to send email asynchronously in Django. Supports HTML email, database backed templates and logging.
MIT License
1k stars 270 forks source link

Commit aa1617e creates issues when creating a new email where context is also set. #443

Open gabn88 opened 1 year ago

gabn88 commented 1 year ago

In my case I do always set the context, but I also leave template sometimes empty.

Then the "fix" in commit aa1617e creates an error:

AttributeError post_office.tasks.send_queued_mail
'NoneType' object has no attribute 'subject'

on line 
            subject = engine.from_string(self.template.subject).render(self.context)
selwin commented 1 year ago

Mind opening a PR for this?

gabn88 commented 11 months ago

@selwin Sorry for the slow response. Using an older version for now. This is however still a problem in the latest master.