From ee47798aaef25a9ac9da7fd629ee2cca61c097c2 Mon Sep 17 00:00:00 2001 From: dholms Date: Fri, 3 Nov 2023 19:19:48 -0500 Subject: [PATCH] patch --- packages/pds/src/migrate-script/migrate-all.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/pds/src/migrate-script/migrate-all.ts b/packages/pds/src/migrate-script/migrate-all.ts index ae9222a4b76..5d0f2cb36ce 100644 --- a/packages/pds/src/migrate-script/migrate-all.ts +++ b/packages/pds/src/migrate-script/migrate-all.ts @@ -48,14 +48,13 @@ export const runScript = async () => { let completed = 0 let failed = 0 for (const status of todo) { - let pdsId = status.pdsId - if (!pdsId) { - pdsId = pdsInfos[pdsCounter % pdsInfos.length].id + if (!status.pdsId) { + status.pdsId = pdsInfos[pdsCounter % pdsInfos.length].id pdsCounter++ } - const pdsInfo = pdsInfos.find((info) => info.id === pdsId) + const pdsInfo = pdsInfos.find((info) => info.id === status.pdsId) if (!pdsInfo) { - throw new Error(`could not find pds with id: ${pdsId}`) + throw new Error(`could not find pds with id: ${status.pdsId}`) } try { await migrateRepo(ctx, db, pdsInfo, status, adminToken)