From 8a2b2a2b68608cb626dbf22fd5672f55da9830d6 Mon Sep 17 00:00:00 2001 From: Shllokkk Date: Fri, 7 Aug 2026 19:33:45 +0530 Subject: [PATCH] fix: guard reconciliation table deletes when tables are missing --- .../patches/v14_0/clear_reconciliation_values_from_singles.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/patches/v14_0/clear_reconciliation_values_from_singles.py b/erpnext/patches/v14_0/clear_reconciliation_values_from_singles.py index c1f5b60a406..21b31e3bda9 100644 --- a/erpnext/patches/v14_0/clear_reconciliation_values_from_singles.py +++ b/erpnext/patches/v14_0/clear_reconciliation_values_from_singles.py @@ -1,3 +1,4 @@ +import frappe from frappe import qb @@ -13,5 +14,8 @@ def execute(): "Payment Reconciliation Allocation", ] for x in doctypes: + # child tables may not exist yet on sites where this pre-model-sync patch runs first + if not frappe.db.table_exists(x): + continue dt = qb.DocType(x) qb.from_(dt).delete().run()