fix: handle stock balance unbuffered_cursor error (#41186)

This commit is contained in:
Ankush Menat
2024-04-25 17:13:58 +05:30
committed by GitHub
parent 5f6bf4c369
commit 341fb6d8f3

View File

@@ -146,6 +146,8 @@ class StockBalanceReport:
if self.filters.get("show_stock_ageing_data"):
self.sle_entries = self.sle_query.run(as_dict=True)
# HACK: This is required to avoid causing db query in flt
_system_settings = frappe.get_cached_doc("System Settings")
with frappe.db.unbuffered_cursor():
if not self.filters.get("show_stock_ageing_data"):
self.sle_entries = self.sle_query.run(as_dict=True, as_iterator=True)