fix: patch to migrate checkbox data into select

(cherry picked from commit c36fa5bdb6)
This commit is contained in:
khushi8112
2026-02-03 23:44:07 +05:30
parent 87a7bc6f49
commit 4d0e28a608
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import frappe
from frappe.query_builder import Case
def execute():
Asset = frappe.qb.DocType("Asset")
frappe.qb.update(Asset).set(
Asset.asset_type,
Case()
.when(Asset.is_existing_asset == 1, "Existing Asset")
.when(Asset.is_composite_asset == 1, "Composite Asset")
.when(Asset.is_composite_component == 1, "Composite Component")
.else_(""),
).run()