mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-20 18:54:55 +00:00
Merge pull request #49835 from frappe/mergify/bp/version-15/pr-49833
fix: too many writes on patch run (backport #49832) (backport #49833)
This commit is contained in:
@@ -9,5 +9,10 @@ def execute():
|
||||
docs = frappe.get_all(
|
||||
"Material Request", filters={"buying_price_list": ["is", "not set"], "docstatus": 1}, pluck="name"
|
||||
)
|
||||
for doc in docs:
|
||||
frappe.db.set_value("Material Request", doc, "buying_price_list", default_buying_price_list)
|
||||
old_limit = frappe.db.MAX_WRITES_PER_TRANSACTION
|
||||
frappe.db.MAX_WRITES_PER_TRANSACTION *= 4
|
||||
try:
|
||||
for doc in docs:
|
||||
frappe.db.set_value("Material Request", doc, "buying_price_list", default_buying_price_list)
|
||||
finally:
|
||||
frappe.db.MAX_WRITES_PER_TRANSACTION = old_limit
|
||||
|
||||
Reference in New Issue
Block a user