Taichi Masuyama hace 4 años
padre
commit
4a10e32d10
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      packages/app/src/server/models/page.ts

+ 4 - 0
packages/app/src/server/models/page.ts

@@ -573,9 +573,13 @@ schema.statics.getParentAndFillAncestors = async function(path: string, user, pa
 
   // find ancestors
   const builder2 = new PageQueryBuilder(this.find(), true);
+  // avoid including not normalized pages
   if (pathsToExcludeNotNormalizedPages != null) {
     builder2.addConditionToFilterByApplicableAncestors(pathsToExcludeNotNormalizedPages);
   }
+  else {
+    builder2.addConditionToFilterByApplicableAncestors(ancestorPaths);
+  }
   const ancestors = await builder2
     .addConditionToListByPathsArray(ancestorPaths)
     .addConditionToSortPagesByDescPath()