mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-17 00:18:39 +00:00
add_bank_accounts() inserts a Bank Account per Plaid account in a loop. On a duplicate the bare insert raises UniqueValidationError, which on Postgres aborts the whole transaction; the handler only msgprint'd and continued, so the next iteration's insert died with InFailedSqlTransaction. Wrap each iteration in a savepoint and roll back to it in the handlers (the pattern frappe#40075 prescribes after dropping the blanket per-insert savepoint). No-op on MariaDB.