mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-14 15:11:52 +00:00
fix(setup): rollback before logging in install_country_fixtures (Postgres)
Regional fixture setup writes docs; on failure the except calls frappe.log_error before frappe.throw with no rollback -> InFailedSqlTransaction on Postgres. Full rollback before log_error. No-op on MariaDB.
This commit is contained in:
@@ -856,6 +856,7 @@ def install_country_fixtures(company, country):
|
||||
except ImportError:
|
||||
pass
|
||||
except Exception:
|
||||
frappe.db.rollback()
|
||||
frappe.log_error("Unable to set country fixtures")
|
||||
frappe.throw(
|
||||
_("Failed to setup defaults for country {0}. Please contact support.").format(
|
||||
|
||||
Reference in New Issue
Block a user