Skip to content

Commit 9e24299

Browse files
committed
chore: fix bad logic in troubleshooting code
1 parent e752e23 commit 9e24299

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/job-worker/src/ingest/commit.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,10 @@ async function updatePartInstancesSegmentIds(
402402
if (writeOps.length) await context.directCollections.PartInstances.bulkWrite(writeOps)
403403

404404
// Double check that there are no parts using the old segment ids:
405-
const oldSegmentIds = Array.from(renameRules.keys())
405+
const oldSegmentIds: SegmentId[] = []
406+
for (const renameRule of renameRules.values()) {
407+
oldSegmentIds.push(...renameRule.fromSegmentIds)
408+
}
406409
const [badPartInstances, badParts] = await Promise.all([
407410
await context.directCollections.PartInstances.findFetch({
408411
rundownId: ingestModel.rundownId,

0 commit comments

Comments
 (0)