perf!: frappe.db.exists without order_by (#20093)

This commit is contained in:
Ankush Menat 2023-02-20 17:28:03 +05:30 committed by GitHub
parent 8446875257
commit 30f0b4ea2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1046,7 +1046,7 @@ class Database:
dt = dt.copy() # don't modify the original dict
dt, dn = dt.pop("doctype"), dt
return self.get_value(dt, dn, ignore=True, cache=cache)
return self.get_value(dt, dn, ignore=True, cache=cache, order_by=None)
def count(self, dt, filters=None, debug=False, cache=False, distinct: bool = True):
"""Returns `COUNT(*)` for given DocType and filters."""