fix(pstch): allow duplicate entries (#16632)
This commit is contained in:
parent
d95c8cfac3
commit
1a7e438fb2
@ -27,8 +27,10 @@ def execute():
|
||||
for company in companies:
|
||||
copy_doc = frappe.copy_doc(department_doc)
|
||||
copy_doc.update({"company": company.name})
|
||||
copy_doc.insert()
|
||||
|
||||
try:
|
||||
copy_doc.insert()
|
||||
except frappe.DuplicateEntryError:
|
||||
pass
|
||||
# append list of new department for each company
|
||||
comp_dict[company.name][department.name] = copy_doc.name
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user