fix: check if dynamic filters exists
This commit is contained in:
parent
502f0ebad5
commit
e3ce17a0c9
2 changed files with 2 additions and 2 deletions
|
|
@ -176,7 +176,7 @@ frappe.ui.form.on('Dashboard Chart', {
|
|||
|
||||
set_chart_field_options: function(frm) {
|
||||
let filters = frm.doc.filters_json.length > 2 ? JSON.parse(frm.doc.filters_json) : null;
|
||||
if (frm.doc.dynamic_filters_json.length > 2) {
|
||||
if (frm.doc.dynamic_filters_json && frm.doc.dynamic_filters_json.length > 2) {
|
||||
filters = frappe.dashboard_utils.get_all_filters(frm.doc);
|
||||
}
|
||||
frappe.xcall(
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ frappe.ui.form.on('Number Card', {
|
|||
|
||||
set_report_field_options: function(frm) {
|
||||
let filters = frm.doc.filters_json.length > 2 ? JSON.parse(frm.doc.filters_json) : null;
|
||||
if (frm.doc.dynamic_filters_json.length > 2) {
|
||||
if (frm.doc.dynamic_filters_json && frm.doc.dynamic_filters_json.length > 2) {
|
||||
filters = frappe.dashboard_utils.get_all_filters(frm.doc);
|
||||
}
|
||||
frappe.xcall(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue