mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
perf: cache pricing rule query
This commit is contained in:
@@ -28,7 +28,7 @@ def get_pricing_rules(args, doc=None):
|
|||||||
pricing_rules = []
|
pricing_rules = []
|
||||||
values = {}
|
values = {}
|
||||||
|
|
||||||
if not frappe.db.exists("Pricing Rule", {"disable": 0, args.transaction_type: 1}):
|
if not frappe.db.count("Pricing Rule", cache=True):
|
||||||
return
|
return
|
||||||
|
|
||||||
for apply_on in ["Item Code", "Item Group", "Brand"]:
|
for apply_on in ["Item Code", "Item Group", "Brand"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user