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:
Mihir Kandoi
2026-06-29 22:42:48 +05:30
parent 01811ccf85
commit 8c0b4a99cf

View File

@@ -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(