refactor: remove frappe.flags from accounting dimensions filter

This commit is contained in:
ruthra kumar
2026-02-27 16:37:27 +05:30
parent 048608556c
commit 290f979fd3

View File

@@ -69,7 +69,6 @@ class AccountingDimensionFilter(Document):
def get_dimension_filter_map(): def get_dimension_filter_map():
if not frappe.flags.get("dimension_filter_map"):
filters = frappe.db.sql( filters = frappe.db.sql(
""" """
SELECT SELECT
@@ -97,9 +96,7 @@ def get_dimension_filter_map():
f.allow_or_restrict, f.allow_or_restrict,
f.is_mandatory, f.is_mandatory,
) )
frappe.flags.dimension_filter_map = dimension_filter_map return dimension_filter_map
return frappe.flags.dimension_filter_map
def build_map(map_object, dimension, account, filter_value, allow_or_restrict, is_mandatory): def build_map(map_object, dimension, account, filter_value, allow_or_restrict, is_mandatory):