🐛 Fix problems with repair and validation

This commit is contained in:
alonso.torres 2026-05-21 13:48:41 +02:00
parent c43a0160c1
commit 3340471d23
2 changed files with 7 additions and 4 deletions

View File

@ -644,9 +644,11 @@
(fn [shape]
;; Set the desired swap slot
(let [slot (:swap-slot args)]
(when (some? slot)
(log/debug :hint (str " -> set swap-slot to " slot))
(ctk/set-swap-slot shape slot))))]
(if (some? slot)
(do
(log/debug :hint (str " -> set swap-slot to " slot))
(ctk/set-swap-slot shape slot))
shape)))]
(log/dbg :hint "repairing shape :missing-slot" :id (:id shape) :name (:name shape) :page-id page-id)
(-> (pcb/empty-changes nil page-id)

View File

@ -704,7 +704,8 @@
(defn- get-orphan-shapes
[{:keys [objects] :as page}]
(let [xf (comp (map #(contains? objects (:parent-id %)))
(let [xf (comp (filter #(and (some? (:parent-id %))
(not (contains? objects (:parent-id %)))))
(map :id))]
(into [] xf (vals objects))))