fix: should not remove child block

This commit is contained in:
Peng Xiao
2022-08-06 00:39:54 +08:00
parent 1ea91988a2
commit e9e2df17df

View File

@@ -76,7 +76,10 @@
:block/whiteboard? true
:block/properties (dissoc tldr-data :shapes)}
;; todo: use get-paginated-blocks instead?
existing-blocks (model/get-page-blocks-no-cache page-name)
existing-blocks (model/get-page-blocks-no-cache (state/get-current-repo)
page-name
{:pull-keys '[:block/uuid
{:block/parent [:block/uuid]}]})
shapes (:shapes tldr-data)
blocks (mapv #(shape->block % page-name) shapes)
block-ids (->> shapes