From f1eb453a19cc1e5504952f3a5321a20c0d656640 Mon Sep 17 00:00:00 2001 From: Shawn Date: Fri, 29 May 2026 00:13:08 -0400 Subject: [PATCH] fix: keep GUEST/CAST visible in asset names - clean_customer_name() no longer strips GUEST/CAST suffixes - Re-ran migration: 967 asset names updated with GUEST/CAST preserved - Format: '95301 - Animal Kingdom CAST / address / building' vs previous: '95301 - Animal Kingdom / address / building' --- scripts/migrate_asset_names.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/migrate_asset_names.py b/scripts/migrate_asset_names.py index f123494..4bf4105 100644 --- a/scripts/migrate_asset_names.py +++ b/scripts/migrate_asset_names.py @@ -70,19 +70,17 @@ BUILDING_NAME_MAP = { def clean_customer_name(raw: str) -> str: - """Clean a customer name for display. + """Clean a customer name for display — keeps GUEST/CAST suffix visible. - D-All Star Music GUEST → All Star Music Guest + D-All Star Music GUEST → All Star Music GUEST Home Depot #0232 Southlan → Home Depot #0232 Southlan """ if not raw: return "" name = raw - # Remove D- prefix (Disney identifier) + # Remove D- prefix (Disney identifier) only if name.startswith("D-") or name.startswith("D "): name = name[2:] - # Remove GUEST/CAST/ROOM suffixes for cleaner display - name = re.sub(r'\s+(?:GUEST|CAST|GUEST ROOM|GST|GUEST?)\s*$', '', name, flags=re.I) name = name.strip() return name