Просмотр исходного кода

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

Skip projects without history when migrating

GitOrigin-RevId: d38539fbc1b6e406b833f849276c3829ad722d91
Eric Mc Sween 2 лет назад
Родитель
Сommit
898f6c81c8

+ 4 - 0
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)) } })
   }