[optimize] remove count(*) from queries

This commit is contained in:
Rushabh Mehta
2016-11-21 14:57:36 +05:30
parent 8042aa4b52
commit 5a258cbc2d
6 changed files with 11 additions and 11 deletions

View File

@@ -110,7 +110,7 @@ def _test_recurring_document(obj, base_doc, date_field, first_and_last_day):
no_of_months = ({"Monthly": 1, "Quarterly": 3, "Yearly": 12})[base_doc.recurring_type]
def _test(i):
obj.assertEquals(i+1, frappe.db.sql("""select count(*) from `tab%s`
obj.assertEquals(i+1, frappe.db.sql("""select count(name) from `tab%s`
where recurring_id=%s and (docstatus=1 or docstatus=0)""" % (base_doc.doctype, '%s'),
(base_doc.recurring_id))[0][0])