mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-20 09:49:58 +00:00
fix(manufacturing): rollback before marking BOM Creator failed (Postgres)
create_production_plan_bom (background job) save+submits BOMs in a loop; on failure the except runs self.db_set(status=Failed, error_log) with no rollback, raising InFailedSqlTransaction on Postgres so status is never set. Full frappe.db.rollback() at the top of the except. No-op on MariaDB.
This commit is contained in:
@@ -313,6 +313,7 @@ class BOMCreator(Document):
|
||||
|
||||
frappe.msgprint(_("BOMs created successfully"))
|
||||
except Exception:
|
||||
frappe.db.rollback()
|
||||
traceback = frappe.get_traceback(with_context=True)
|
||||
self.db_set(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user