From 99d39ea0a97671eb67752246819393ada31739e0 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 20 Jun 2017 15:00:15 +0530 Subject: [PATCH] [fix] Auto email report not working --- frappe/email/doctype/auto_email_report/auto_email_report.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/email/doctype/auto_email_report/auto_email_report.js b/frappe/email/doctype/auto_email_report/auto_email_report.js index bad77c6939..59f721e4dd 100644 --- a/frappe/email/doctype/auto_email_report/auto_email_report.js +++ b/frappe/email/doctype/auto_email_report/auto_email_report.js @@ -66,7 +66,9 @@ frappe.ui.form.on('Auto Email Report', { var filters = JSON.parse(frm.doc.filters || '{}'); var report_filters = frappe.query_reports[frm.doc.report].filters; - frm.set_value('filter_meta', JSON.stringify(report_filters)); + if(report_filters.length > 0) { + frm.set_value('filter_meta', JSON.stringify(report_filters)); + } report_filters_list = [] $.each(report_filters, function(key, val){