fix(telephony): rollback before logging in call_log link_existing_conversations (Postgres)

The hook saves Call Logs in a loop; on failure the except calls frappe.log_error (INSERT) with no rollback, raising InFailedSqlTransaction on Postgres (it runs on every Contact create/update). Full frappe.db.rollback() before log_error. No-op on MariaDB.
This commit is contained in:
Mihir Kandoi
2026-06-29 22:42:48 +05:30
parent 09a3eb8509
commit 01811ccf85

View File

@@ -196,6 +196,7 @@ def link_existing_conversations(doc, state):
if not frappe.in_test:
frappe.db.commit()
except Exception:
frappe.db.rollback()
frappe.log_error(title=_("Error during caller information update"))