Add committing of the db operations into the migration lifecycle
This commit is contained in:
parent
85e3838396
commit
b0a3d972f0
4 changed files with 84 additions and 30 deletions
|
|
@ -34,10 +34,14 @@ export class TAFActor extends Actor {
|
|||
this.#sortedTypes = null;
|
||||
};
|
||||
|
||||
static migrateData(data, ...args) {
|
||||
static migrateData(data, options) {
|
||||
if (options.partial) { return }
|
||||
console.log(`Actor#migrateData`, foundry.utils.deepClone(data), options);
|
||||
if (Object.keys(data.system?.attr ?? {}).length > 0) {
|
||||
console.log(`attributes exist`)
|
||||
setProperty(data, `flags.${__ID__}.convertAttributesIntoItems`, true);
|
||||
};
|
||||
return data;
|
||||
};
|
||||
// #endregion Lifecycle
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue