mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-16 16:08:39 +00:00
new_bank_transaction inserts+submits Bank Transactions in a loop within one transaction. On a failed insert/submit, Postgres poisons the transaction so the except's log_error dies with InFailedSqlTransaction; MariaDB keeps the Bank Transactions synced before the failure. A full rollback would discard those on MariaDB too, so wrap each iteration in a savepoint + rollback(save_point=) and re-raise -- preserves MariaDB's partial-sync behaviour and heals the Postgres txn. The sibling handlers add_institution / add_bank_accounts were already fixed; this closes the third. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>