fix: guard reconciliation table deletes when tables are missing

(cherry picked from commit 8a2b2a2b68)
This commit is contained in:
Shllokkk
2026-08-07 19:33:45 +05:30
committed by Mergify
parent 522d7bb1a9
commit 140e06dfa4

View File

@@ -1,3 +1,4 @@
import frappe
from frappe import qb from frappe import qb
@@ -13,5 +14,8 @@ def execute():
"Payment Reconciliation Allocation", "Payment Reconciliation Allocation",
] ]
for x in doctypes: 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) dt = qb.DocType(x)
qb.from_(dt).delete().run() qb.from_(dt).delete().run()