mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 04:15:10 +00:00
fix: migration patch
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user