Explorar o código

Improved condition

Taichi Masuyama %!s(int64=4) %!d(string=hai) anos
pai
achega
c983223c5e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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
-          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;
             logger.error('Migration is unable to continue', 'parentPaths:', parentPaths, 'bulkWriteResult:', res);
           }