mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
perf: cache existence of budgets while validating GL
This commit is contained in:
@@ -145,7 +145,7 @@ class Budget(Document):
|
|||||||
|
|
||||||
def validate_expense_against_budget(args, expense_amount=0):
|
def validate_expense_against_budget(args, expense_amount=0):
|
||||||
args = frappe._dict(args)
|
args = frappe._dict(args)
|
||||||
if not frappe.get_all("Budget", limit=1):
|
if not frappe.db.count("Budget", cache=True):
|
||||||
return
|
return
|
||||||
|
|
||||||
if args.get("company") and not args.fiscal_year:
|
if args.get("company") and not args.fiscal_year:
|
||||||
|
|||||||
Reference in New Issue
Block a user