fix: :default property value objects shouldn't reference

their parent block. For logseq/db-test#36
pull/11483/head^2
Gabriel Horner 2024-08-22 17:23:37 -04:00
parent 29c8a4fc4a
commit 3d1ed4ca54
1 changed files with 8 additions and 3 deletions

View File

@ -151,9 +151,14 @@
(into {}))
property-key-refs (->> (keys properties)
(remove private-built-in-props))
page-or-object? (fn [block] (and (de/entity? block)
(or (ldb/page? block)
(seq (:block/tags block)))))
page-or-object? (fn [block]
(and (de/entity? block)
(or (ldb/page? block)
(seq (:block/tags block)))
;; Don't allow :default property value objects to reference their
;; parent block as they are dependent on their block for display
;; and look weirdly recursive - https://github.com/logseq/db-test/issues/36
(not (:logseq.property/created-from-property block))))
property-value-refs (->> (vals properties)
(mapcat (fn [v]
(cond