fix: improve property type ux by locking once property is used

fixes LOG-2900. Also fixed lint
This commit is contained in:
Gabriel Horner
2023-11-13 10:05:54 -05:00
parent ed4053767b
commit d656c75428
4 changed files with 16 additions and 12 deletions

View File

@@ -279,9 +279,7 @@
(contains? (:block/type page) "property")
(cond (seq (model/get-classes-with-property (:block/uuid page)))
{:msg "Page content deleted but unable to delete this page because classes use this property"}
(->> (model/get-block-property-values (:block/uuid page))
(filter (fn [[_ v]] (if (seq? v) (seq v) (some? v))))
seq)
(seq (model/get-block-property-values (:block/uuid page)))
{:msg "Page content deleted but unable to delete this page because blocks use this property"})
(or (seq (:block/_refs page)) (contains? (:block/type page) "hidden"))