fix: don't prompt user to break :logseq.class/Tag

On Parent page user could break #Tag
This commit is contained in:
Gabriel Horner
2025-03-04 10:23:56 -05:00
parent ec9944db2d
commit f1d823815f

View File

@@ -1267,10 +1267,11 @@
(or (= (:db/id v) (:db/id block))
;; property value self embedded
(= (:db/id (:block/link v)) (:db/id block))))]
(if (or (and (de/entity? v) (self-value-or-embedded? v))
(and (coll? v) (every? de/entity? v)
(some self-value-or-embedded? v))
(and (= p-block (:db/id block)) (= p-property (:db/id property))))
(if (and (or (and (de/entity? v) (self-value-or-embedded? v))
(and (coll? v) (every? de/entity? v)
(some self-value-or-embedded? v))
(and (= p-block (:db/id block)) (= p-property (:db/id property))))
(not= :logseq.class/Tag (:db/ident block)))
[:div.flex.flex-row.items-center.gap-1
[:div.warning "Self reference"]
(shui/button {:variant :outline