Update notifications.py
Fix 500 from uwsgi spooler if title not detected on page
This commit is contained in:
parent
fd0507aa5e
commit
2fcb39cc11
@ -132,7 +132,7 @@ class SMTP(object):
|
|||||||
body = self.format(thread, comment)
|
body = self.format(thread, comment)
|
||||||
|
|
||||||
if uwsgi:
|
if uwsgi:
|
||||||
uwsgi.spool({b"subject": thread["title"].encode("utf-8"),
|
uwsgi.spool({b"subject": thread['title'].encode("utf-8") if 'title' in thread else 'New comment',
|
||||||
b"body": body.encode("utf-8")})
|
b"body": body.encode("utf-8")})
|
||||||
else:
|
else:
|
||||||
start_new_thread(self._retry, (thread["title"], body))
|
start_new_thread(self._retry, (thread["title"], body))
|
||||||
|
Loading…
Reference in New Issue
Block a user