fix: migration patch

This commit is contained in:
khushi8112
2026-02-26 16:35:24 +05:30
parent 7f6b8a3e40
commit 7b44e412d9

View File

@@ -3,6 +3,16 @@ from frappe.query_builder import Case
def execute():
required_columns = [
"is_existing_asset",
"is_composite_asset",
"is_composite_component",
]
# Skip patch if any required column is missing
if not all(frappe.db.has_column("Asset", col) for col in required_columns):
return
Asset = frappe.qb.DocType("Asset")
frappe.qb.update(Asset).set(