Migrate data model of compendiums before migrating the content

This commit is contained in:
Johannes Loher 2021-05-13 20:13:32 +02:00
parent b9f7588f95
commit 8cf6db2ba5

View file

@ -115,6 +115,7 @@ async function migrateCompendium(compendium: Compendium) {
if (!["Actor", "Item", "Scene"].includes(entityName)) return;
const wasLocked = compendium.locked;
await compendium.configure({ locked: false });
await compendium.migrate({});
const content = await compendium.getContent();
@ -141,6 +142,5 @@ async function migrateCompendium(compendium: Compendium) {
}
}
await compendium.migrate({});
await compendium.configure({ locked: wasLocked });
}