From fa2bec7f064e152b9f846fa89debf299aaf453f4 Mon Sep 17 00:00:00 2001 From: Oleg Isonen Date: Mon, 9 May 2022 22:00:50 +0200 Subject: [PATCH] skip when breakpoint isn't found over project, it must created by newer version --- mongo-migrations/published-breakpoints.js | 1 + 1 file changed, 1 insertion(+) diff --git a/mongo-migrations/published-breakpoints.js b/mongo-migrations/published-breakpoints.js index 8af778a63d..c1be36caf7 100644 --- a/mongo-migrations/published-breakpoints.js +++ b/mongo-migrations/published-breakpoints.js @@ -6,6 +6,7 @@ let migrateBreakpoints = () => { print(`updating breakpoints for ${project._id}`); try { const breakpoint = db.Breakpoints.findOne({ _id: project._id }); + if (breakpoint === null) return; breakpoint._id = project.devTreeId; db.Breakpoints.insertOne(breakpoint); db.Breakpoints.remove({ _id: project._id }, true);