diff --git a/cgi-bin/webnotes/modules/patch.py b/cgi-bin/webnotes/modules/patch.py index 5ecd84446c..0b6810f62b 100644 --- a/cgi-bin/webnotes/modules/patch.py +++ b/cgi-bin/webnotes/modules/patch.py @@ -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 + '

Login User: ' + webnotes.user.name + '

' + 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]])