Skip to content

Commit

Permalink
perf: Commit patch progress after every 50 BOMs
Browse files Browse the repository at this point in the history
  • Loading branch information
marination committed May 27, 2022
1 parent c6e9d6c commit 3d66ea0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions erpnext/patches/v13_0/add_bom_reference_in_exploded_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ def execute():
bom = frappe.get_doc("BOM", bom.name)
bom.update_exploded_items(save=True) # set 'From BOM' in exploded items

if count % 50 == 0: # commit after every 50 BOMs
frappe.db.commit()

frappe.utils.update_progress_bar("Updating Exploded BOM Items ...", count, total_count)

0 comments on commit 3d66ea0

Please sign in to comment.