Taichi Masuyama 4 лет назад
Родитель
Сommit
e5f2dbe621
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      packages/app/src/server/service/page.js

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

@@ -1172,6 +1172,7 @@ class PageService {
             // regexr.com/6889f
             // regexr.com/6889f
             // ex. /parent/any_child OR /any_level1
             // ex. /parent/any_child OR /any_level1
             path: { $regex: new RegExp(`^${parentPath}(\\/[^/]+)\\/?$`, 'i') },
             path: { $regex: new RegExp(`^${parentPath}(\\/[^/]+)\\/?$`, 'i') },
+            parent: null,
           };
           };
           if (grant != null) {
           if (grant != null) {
             filter.grant = grant;
             filter.grant = grant;
@@ -1198,7 +1199,7 @@ class PageService {
           }
           }
 
 
           // finish migration
           // finish migration
-          if (res.result.nModified === 0 && res.result.nMatched === 0) { // TODO: find the best property to count updated documents
+          if (res.result.nModified === 0 && res.result.nMatched === 0) {
             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);
           }
           }