fix: search for porperty block values leads to hidden page

Fixes LOG-2647
This commit is contained in:
Tienson Qin
2023-10-11 13:09:11 +08:00
parent ccc0bf9bad
commit c3e002aade
3 changed files with 21 additions and 1 deletions

View File

@@ -233,3 +233,12 @@
outliner-core/block-with-timestamps)]
{:page page-tx
:blocks [new-block]}))
(defn get-property-block-created-block
"Get the root block that created this property block."
[eid]
(let [b (db/entity eid)
from (get-in b [:block/metadata :created-from-block])]
(if from
(get-property-block-created-block [:block/uuid from])
(:db/id b))))