Fixed the issue when there are no participants while sending email.

This commit is contained in:
Anupam Shakya 2012-09-24 19:57:44 +05:30
parent d9a2ab849b
commit 94bcc95261
1 changed files with 3 additions and 0 deletions

View File

@ -1277,6 +1277,9 @@ class ProjectHistory(ModelSQL, ModelView):
receivers = [s.email for s in history.project.participants
if s.email]
if not receivers:
return
message = render_email(
from_email=CONFIG['smtp_from'],
to=', '.join(receivers),