perf: Use lazy loaded documents (#48017)

* perf: Use lazy docs for status updaters and similar use cases

* perf: lazy load documents while reposting
This commit is contained in:
Ankush Menat
2025-06-11 15:57:08 +05:30
committed by GitHub
parent 76982fe133
commit d16a6d42a5
17 changed files with 44 additions and 47 deletions

View File

@@ -154,7 +154,7 @@ class BudgetValidation:
def get_dimensions(self):
self.dimensions = []
for _x in frappe.db.get_all("Accounting Dimension"):
self.dimensions.append(frappe.get_doc("Accounting Dimension", _x.name))
self.dimensions.append(frappe.get_lazy_doc("Accounting Dimension", _x.name))
self.dimensions.extend(
[
{"fieldname": "cost_center", "document_type": "Cost Center"},