Merge pull request #19250 from overleaf/em-skip-no-history

Skip projects without history when migrating

GitOrigin-RevId: d38539fbc1b6e406b833f849276c3829ad722d91
This commit is contained in:
Eric Mc Sween 2024-07-03 11:13:45 -04:00 committed by Copybot
parent 5903720dbd
commit 898f6c81c8

View file

@ -38,6 +38,10 @@ async function migrateProjects(opts = {}) {
} = opts } = opts
const clauses = [] const clauses = []
// skip projects that don't have full project history
clauses.push({ 'overleaf.history': { $exists: true } })
if (projectIds != null) { if (projectIds != null) {
clauses.push({ _id: { $in: projectIds.map(id => new ObjectId(id)) } }) clauses.push({ _id: { $in: projectIds.map(id => new ObjectId(id)) } })
} }