From 3c64e201cc36f309b16de1c83c1e4d27aa6a2826 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 4 Dec 2021 20:05:37 +0530 Subject: [PATCH] fix: Log error before throwing exception --- erpnext/accounts/deferred_revenue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py index 1afed127b2..22c81ddd46 100644 --- a/erpnext/accounts/deferred_revenue.py +++ b/erpnext/accounts/deferred_revenue.py @@ -374,9 +374,9 @@ def make_gl_entries(doc, credit_account, debit_account, against, frappe.db.commit() except Exception as e: if frappe.flags.in_test: - raise e traceback = frappe.get_traceback() frappe.log_error(title=_('Error while processing deferred accounting for Invoice {0}').format(doc.name), message=traceback) + raise e else: frappe.db.rollback() traceback = frappe.get_traceback()