Merge pull request #6887 from sunnyakaxd/patch-3

fix: remove distinct from count
This commit is contained in:
Rushabh Mehta 2019-02-07 07:03:38 +05:30 committed by GitHub
commit 9b35a090c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -597,7 +597,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
args: {
doctype: this.doctype,
filters: this.get_filters_for_args(),
fields: [`count(distinct ${frappe.model.get_full_column_name('name', this.doctype)}) as total_count`],
fields: [`count(${frappe.model.get_full_column_name('name', this.doctype)}) as total_count`],
}
}).then(r => {
this.total_count = r.message.values[0][0] || current_count;