浏览代码

fix: uuid nodes and view nodes not grouping by page

They were grouping instead by parent which caused parent blocks to incorrectly
export as pages
Gabriel Horner 7 月之前
父节点
当前提交
4d58925ad7
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      deps/db/src/logseq/db/sqlite/export.cljs

+ 2 - 2
deps/db/src/logseq/db/sqlite/export.cljs

@@ -347,7 +347,7 @@
         uuid-block-pages
         (when (seq uuid-block-ents-to-export)
           (->> uuid-block-ents-to-export
-               (group-by :block/parent)
+               (group-by :block/page)
                ;; Remove page-entity because it's already been built for content-ref-ents
                ;; and it's unlikely and complex to handle for pvalue-uuids
                ((fn [m] (dissoc m page-entity)))
@@ -443,7 +443,7 @@
         ;; Similar to build-uuid-block-export
         pages-to-blocks
         (->> node-blocks
-             (group-by :block/parent)
+             (group-by :block/page)
              (map (fn [[parent-page-ent blocks]]
                     (merge (build-blocks-export db
                                                 (sort-by :block/order blocks)