fix: ignore non-unique swift numbers while migrating (#30132)
This commit is contained in:
parent
17e16247b1
commit
4d8798b0ea
@ -5,10 +5,13 @@ def execute():
|
||||
frappe.reload_doc('accounts', 'doctype', 'bank', force=1)
|
||||
|
||||
if frappe.db.table_exists('Bank') and frappe.db.table_exists('Bank Account') and frappe.db.has_column('Bank Account', 'swift_number'):
|
||||
try:
|
||||
frappe.db.sql("""
|
||||
UPDATE `tabBank` b, `tabBank Account` ba
|
||||
SET b.swift_number = ba.swift_number WHERE b.name = ba.bank
|
||||
""")
|
||||
except Exception as e:
|
||||
frappe.log_error(e, title="Patch Migration Failed")
|
||||
|
||||
frappe.reload_doc('accounts', 'doctype', 'bank_account')
|
||||
frappe.reload_doc('accounts', 'doctype', 'payment_request')
|
||||
|
Loading…
x
Reference in New Issue
Block a user