mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-17 16:38:41 +00:00
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:
@@ -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"))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user