From 1bcaac101317644f92d21fc84e8caba390127f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Tue, 7 Nov 2023 11:11:14 +0100 Subject: [PATCH] :bug: Force repair of some kind of errors --- common/src/app/common/files/repair.cljc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/common/src/app/common/files/repair.cljc b/common/src/app/common/files/repair.cljc index 0871f62aa..878336145 100644 --- a/common/src/app/common/files/repair.cljc +++ b/common/src/app/common/files/repair.cljc @@ -128,9 +128,12 @@ [_ {:keys [shape page-id] :as error} file-data _] (let [repair-shape (fn [shape] + ; Set :component-file to local file + (log/debug :hint " -> Set :component-file to local file") + (assoc shape :component-file (:id file-data)))] ; There is no solution that may recover it with confidence - (log/warn :hint " -> CANNOT REPAIR THIS AUTOMATICALLY.") - shape)] + ;; (log/warn :hint " -> CANNOT REPAIR THIS AUTOMATICALLY.") + ;; shape)] (log/info :hint "Repairing shape :component-main-external" :id (:id shape) :name (:name shape) :page-id page-id) (-> (pcb/empty-changes nil page-id) @@ -144,12 +147,12 @@ repair-shape (fn [shape] - ;; ; Detach the shape and convert it to non instance. - ;; (log/debug :hint " -> Detach shape" :shape-id (:id shape)) - ;; (ctk/detach-shape shape))] + ; Detach the shape and convert it to non instance. + (log/debug :hint " -> Detach shape" :shape-id (:id shape)) + (ctk/detach-shape shape))] ; There is no solution that may recover it with confidence - (log/warn :hint " -> CANNOT REPAIR THIS AUTOMATICALLY.") - shape)] + ;; (log/warn :hint " -> CANNOT REPAIR THIS AUTOMATICALLY.") + ;; shape)] (log/info :hint "Repairing shape :component-not-found" :id (:id shape) :name (:name shape) :page-id page-id) (-> (pcb/empty-changes nil page-id)