Skip to content

Commit

Permalink
Merge pull request dmdorman#542 from phBalance/phBalance/migration-na…
Browse files Browse the repository at this point in the history
…me-translation

Attempt to correct changes made to item.system.NAME during migration
  • Loading branch information
phBalance authored Dec 24, 2023
2 parents 508f132 + 4a47b56 commit 8b7232a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions module/migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,19 @@ async function migrate_actor_items_to_3_0_53(actor) {
"system.-=characteristic": null,
});
}

// In the past, we filled in item.system.NAME based on item.system.ALIAS.
// We no longer need this as our visualizations should be decoupled from data.
if (
item.system.NAME?.toUpperCase().trim() ===
item.system.XMLID?.toUpperCase().trim() &&
item.name.toUpperCase().trim() ===
item.system.XMLID?.toUpperCase().trim()
) {
await item.update({
"system.NAME": "",
});
}
}
}

Expand Down

0 comments on commit 8b7232a

Please sign in to comment.