瀏覽代碼

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

Skip projects without history when migrating

GitOrigin-RevId: d38539fbc1b6e406b833f849276c3829ad722d91
Eric Mc Sween 2 年之前
父節點
當前提交
898f6c81c8
共有 1 個文件被更改,包括 4 次插入 和 0 次删除
  1. 4 0
      services/web/app/src/Features/History/HistoryRangesSupportMigration.js

+ 4 - 0
services/web/app/src/Features/History/HistoryRangesSupportMigration.js

@@ -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)) } })
   }
   }