diff --git a/frappe/public/js/frappe/db.js b/frappe/public/js/frappe/db.js index 6073c7d3f0..89054e3791 100644 --- a/frappe/public/js/frappe/db.js +++ b/frappe/public/js/frappe/db.js @@ -100,17 +100,11 @@ frappe.db = { const fields = []; - return frappe.call({ - type: 'GET', - method: 'frappe.desk.reportview.get_count', - args: { - doctype, - filters, - fields, - distinct, - } - }).then(r => { - return r.message.values; + return frappe.xcall('frappe.desk.reportview.get_count', { + doctype, + filters, + fields, + distinct, }); }, get_link_options(doctype, txt = '', filters={}) {