Jelajahi Sumber

Improved condition

Taichi Masuyama 4 tahun lalu
induk
melakukan
c983223c5e
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      packages/app/src/server/service/page.js

+ 1 - 1
packages/app/src/server/service/page.js

@@ -1198,7 +1198,7 @@ class PageService {
           }
           }
 
 
           // finish migration
           // finish migration
-          if (res.result.nModified === 0) { // TODO: find the best property to count updated documents
+          if (res.result.nModified === 0 && res.result.nMatched === 0) { // TODO: find the best property to count updated documents
             shouldContinue = false;
             shouldContinue = false;
             logger.error('Migration is unable to continue', 'parentPaths:', parentPaths, 'bulkWriteResult:', res);
             logger.error('Migration is unable to continue', 'parentPaths:', parentPaths, 'bulkWriteResult:', res);
           }
           }