fix: TooManyWritesError during reposting of stock
(cherry picked from commit aaabba9b1e)
This commit is contained in:
committed by
Mergify
parent
3648745e5e
commit
476175b307
@@ -128,6 +128,9 @@ def repost(doc):
|
||||
if not frappe.db.exists("Repost Item Valuation", doc.name):
|
||||
return
|
||||
|
||||
# This is to avoid TooManyWritesError in case of large reposts
|
||||
frappe.db.MAX_WRITES_PER_TRANSACTION *= 4
|
||||
|
||||
doc.set_status("In Progress")
|
||||
if not frappe.flags.in_test:
|
||||
frappe.db.commit()
|
||||
|
||||
Reference in New Issue
Block a user