perf: use get_cached_value instead of db.get_value in accounts module

This commit is contained in:
Daizy Modi
2022-11-03 13:38:48 +05:30
parent 7a5a500d29
commit 27df455b98
33 changed files with 101 additions and 90 deletions

View File

@@ -975,7 +975,7 @@ def get_account_balances(accounts, company):
def create_payment_gateway_account(gateway, payment_channel="Email"):
from erpnext.setup.setup_wizard.operations.install_fixtures import create_bank_account
company = frappe.db.get_value("Global Defaults", None, "default_company")
company = frappe.get_cached_value("Global Defaults", None, "default_company")
if not company:
return