Skip to content

Commit 94bb6b7

Browse files
FinleyGec121914yu
authored andcommitted
fix: initv4141
1 parent 8eacca6 commit 94bb6b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

projects/app/src/pages/api/admin/initv4141.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ async function appSplitMigration(teamId: string) {
9292

9393
for (const folder of allFolders) {
9494
const obj = appMap.get(folder._id)!;
95+
const newParentId = obj?.parentId ? appMap.get(obj!.parentId)?.newId : null;
96+
if (!newParentId) {
97+
continue;
98+
}
9599

96100
const oldRp = RPMap.get(folder._id)!;
97101
rpOps.push({
@@ -112,7 +116,7 @@ async function appSplitMigration(teamId: string) {
112116
teamId
113117
},
114118
update: {
115-
parentId: obj.parentId
119+
parentId: newParentId
116120
}
117121
}
118122
});

0 commit comments

Comments
 (0)