Merge pull request #9 from anupamshakya/master

Fixed the issue when there are no participants while sending email.
This commit is contained in:
Shalabh Aggarwal 2012-09-24 07:34:51 -07:00
commit 23e79d1303
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),