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