fix(accounts): log bank-entry failure without the rolled-back doc (review)

The savepoint rollback erases the just-inserted Bank Transaction row, so bank_transaction.log_error() created an Error Log pointing at a row that no longer exists. Use frappe.log_error(title=...) with no doc reference.
This commit is contained in:
Mihir Kandoi
2026-06-30 12:17:36 +05:30
parent f41e8208d8
commit b0331f13f1

View File

@@ -58,7 +58,7 @@ def create_bank_entries(columns: str, data: str | list, bank_account: str):
success += 1
except Exception:
frappe.db.rollback(save_point="bank_entry")
bank_transaction.log_error("Bank entry creation failed")
frappe.log_error(title="Bank entry creation failed")
errors += 1
return {"success": success, "errors": errors}