chore: remove empty entries from flags in compendium packs
This commit is contained in:
parent
41a4685872
commit
b46c51c9f0
2 changed files with 6 additions and 3 deletions
|
@ -58,6 +58,11 @@ function cleanPackEntry(entry, cleanSourceId = true) {
|
||||||
if (cleanSourceId) {
|
if (cleanSourceId) {
|
||||||
delete entry.flags?.core?.sourceId;
|
delete entry.flags?.core?.sourceId;
|
||||||
}
|
}
|
||||||
|
Object.keys(entry.flags).forEach((scope) => {
|
||||||
|
if (Object.keys(entry.flags[scope]).length === 0) {
|
||||||
|
delete entry.flags[scope];
|
||||||
|
}
|
||||||
|
});
|
||||||
if (entry.permission) entry.permission = { default: 0 };
|
if (entry.permission) entry.permission = { default: 0 };
|
||||||
|
|
||||||
const embeddedDocumentCollections = [
|
const embeddedDocumentCollections = [
|
||||||
|
|
|
@ -5477,9 +5477,7 @@
|
||||||
"permission": {
|
"permission": {
|
||||||
"default": 0
|
"default": 0
|
||||||
},
|
},
|
||||||
"flags": {
|
"flags": {}
|
||||||
"core": {}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"_id": "CIzMY691MK016h4E",
|
"_id": "CIzMY691MK016h4E",
|
||||||
|
|
Loading…
Reference in a new issue