Commit c1c2b468 by Archer Committed by GitHub

fix: initv4141 script (#5967) (#5968)

Co-authored-by: Finley Ge <32237950+FinleyGe@users.noreply.github.com>
parent 6c759a76
...@@ -108,7 +108,9 @@ async function appSplitMigration(teamId: string) { ...@@ -108,7 +108,9 @@ async function appSplitMigration(teamId: string) {
const obj = appMap.get(folder._id)!; const obj = appMap.get(folder._id)!;
const newParentId = obj?.parentId ? appMap.get(obj!.parentId)?.newId : null; const newParentId = obj?.parentId ? appMap.get(obj!.parentId)?.newId : null;
const oldRps = RPMap.get(folder._id)!; const oldRps = RPMap.get(folder._id);
if (oldRps) {
rpOps.push( rpOps.push(
...oldRps.map((oldRp) => ({ ...oldRps.map((oldRp) => ({
insertOne: { insertOne: {
...@@ -120,6 +122,7 @@ async function appSplitMigration(teamId: string) { ...@@ -120,6 +122,7 @@ async function appSplitMigration(teamId: string) {
} }
})) }))
); );
}
if (!newParentId) { if (!newParentId) {
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment