From 4461bde3d660e246d0c6d5ce6ddb8bed26d85f5c Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Wed, 3 Jun 2020 12:38:47 +0530 Subject: [PATCH] fix: Send other auto email report if one fails --- frappe/email/doctype/auto_email_report/auto_email_report.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frappe/email/doctype/auto_email_report/auto_email_report.py b/frappe/email/doctype/auto_email_report/auto_email_report.py index cb00614019..539f6c9db8 100644 --- a/frappe/email/doctype/auto_email_report/auto_email_report.py +++ b/frappe/email/doctype/auto_email_report/auto_email_report.py @@ -216,8 +216,10 @@ def send_daily(): elif auto_email_report.frequency == 'Weekly': if auto_email_report.day_of_week != current_day: continue - - auto_email_report.send() + try: + auto_email_report.send() + except Exception as e: + frappe.log_error(e, _('Failed to send {0} Auto Email Report').format(auto_email_report.name)) def send_monthly():