Ignore duplicate entry
diff --git a/erpnext/patches/v10_0/item_barcode_childtable_migrate.py b/erpnext/patches/v10_0/item_barcode_childtable_migrate.py
index c939dd5..a2e2579 100644
--- a/erpnext/patches/v10_0/item_barcode_childtable_migrate.py
+++ b/erpnext/patches/v10_0/item_barcode_childtable_migrate.py
@@ -16,11 +16,14 @@
barcode = item.barcode.strip()
if barcode and '<' not in barcode:
- frappe.get_doc({
- 'idx': 0,
- 'doctype': 'Item Barcode',
- 'barcode': barcode,
- 'parenttype': 'Item',
- 'parent': item.name,
- 'parentfield': 'barcodes'
- }).insert()
+ try:
+ frappe.get_doc({
+ 'idx': 0,
+ 'doctype': 'Item Barcode',
+ 'barcode': barcode,
+ 'parenttype': 'Item',
+ 'parent': item.name,
+ 'parentfield': 'barcodes'
+ }).insert()
+ except frappe.DuplicateEntryError:
+ continue