sent patch error notification only if admin_email_notification is on

This commit is contained in:
Nabin Hait 2011-08-31 14:48:00 +05:30
parent 05b6062783
commit ae2ce62be3

View file

@ -34,4 +34,5 @@ def write_log():
from webnotes.utils import sendmail
subj = 'Error in running patches in %s' % webnotes.conn.cur_db_name
msg = subj + '<br><br>Login User: ' + webnotes.user.name + '<br><br>' + webnotes.getTraceback()
sendmail(['developer@erpnext.com'], sender='automail@erpnext.com', subject= subj, parts=[['text/plain', msg]])
if getattr(webnotes.defs,'admin_email_notification',1):
sendmail(['developers@erpnext.com'], sender='automail@erpnext.com', subject= subj, parts=[['text/plain', msg]])