From 898f6c81c85b5b29a37a814989605dbe07fdd133 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:13:45 -0400 Subject: [PATCH] Merge pull request #19250 from overleaf/em-skip-no-history Skip projects without history when migrating GitOrigin-RevId: d38539fbc1b6e406b833f849276c3829ad722d91 --- .../app/src/Features/History/HistoryRangesSupportMigration.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/web/app/src/Features/History/HistoryRangesSupportMigration.js b/services/web/app/src/Features/History/HistoryRangesSupportMigration.js index c9529b182f..ba1b1d1244 100644 --- a/services/web/app/src/Features/History/HistoryRangesSupportMigration.js +++ b/services/web/app/src/Features/History/HistoryRangesSupportMigration.js @@ -38,6 +38,10 @@ async function migrateProjects(opts = {}) { } = opts const clauses = [] + + // skip projects that don't have full project history + clauses.push({ 'overleaf.history': { $exists: true } }) + if (projectIds != null) { clauses.push({ _id: { $in: projectIds.map(id => new ObjectId(id)) } }) }