mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 11:13:32 +00:00
fix: too many writes on patch run
(cherry picked from commit44ff6ed6a1) (cherry picked from commita2bf53ff0a)
This commit is contained in:
@@ -9,5 +9,8 @@ def execute():
|
|||||||
docs = frappe.get_all(
|
docs = frappe.get_all(
|
||||||
"Material Request", filters={"buying_price_list": ["is", "not set"], "docstatus": 1}, pluck="name"
|
"Material Request", filters={"buying_price_list": ["is", "not set"], "docstatus": 1}, pluck="name"
|
||||||
)
|
)
|
||||||
|
old_limit = frappe.db.MAX_WRITES_PER_TRANSACTION
|
||||||
|
frappe.db.MAX_WRITES_PER_TRANSACTION *= 4
|
||||||
for doc in docs:
|
for doc in docs:
|
||||||
frappe.db.set_value("Material Request", doc, "buying_price_list", default_buying_price_list)
|
frappe.db.set_value("Material Request", doc, "buying_price_list", default_buying_price_list)
|
||||||
|
frappe.db.MAX_WRITES_PER_TRANSACTION = old_limit
|
||||||
|
|||||||
Reference in New Issue
Block a user