fix: Return correct value from frappe.db.count (bp #12748) (#12750)

(cherry picked from commit b279ca2c0f)

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
This commit is contained in:
mergify[bot] 2021-03-31 22:29:56 +05:30 committed by GitHub
parent c26a009ff5
commit 2bd53e95ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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={}) {