mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 02:28:18 -05:00
🐛 Force repair of some kind of errors
This commit is contained in:
parent
967c89a2d3
commit
1bcaac1013
1 changed files with 10 additions and 7 deletions
|
@ -128,9 +128,12 @@
|
||||||
[_ {:keys [shape page-id] :as error} file-data _]
|
[_ {:keys [shape page-id] :as error} file-data _]
|
||||||
(let [repair-shape
|
(let [repair-shape
|
||||||
(fn [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
|
; There is no solution that may recover it with confidence
|
||||||
(log/warn :hint " -> CANNOT REPAIR THIS AUTOMATICALLY.")
|
;; (log/warn :hint " -> CANNOT REPAIR THIS AUTOMATICALLY.")
|
||||||
shape)]
|
;; shape)]
|
||||||
|
|
||||||
(log/info :hint "Repairing shape :component-main-external" :id (:id shape) :name (:name shape) :page-id page-id)
|
(log/info :hint "Repairing shape :component-main-external" :id (:id shape) :name (:name shape) :page-id page-id)
|
||||||
(-> (pcb/empty-changes nil page-id)
|
(-> (pcb/empty-changes nil page-id)
|
||||||
|
@ -144,12 +147,12 @@
|
||||||
|
|
||||||
repair-shape
|
repair-shape
|
||||||
(fn [shape]
|
(fn [shape]
|
||||||
;; ; Detach the shape and convert it to non instance.
|
; Detach the shape and convert it to non instance.
|
||||||
;; (log/debug :hint " -> Detach shape" :shape-id (:id shape))
|
(log/debug :hint " -> Detach shape" :shape-id (:id shape))
|
||||||
;; (ctk/detach-shape shape))]
|
(ctk/detach-shape shape))]
|
||||||
; There is no solution that may recover it with confidence
|
; There is no solution that may recover it with confidence
|
||||||
(log/warn :hint " -> CANNOT REPAIR THIS AUTOMATICALLY.")
|
;; (log/warn :hint " -> CANNOT REPAIR THIS AUTOMATICALLY.")
|
||||||
shape)]
|
;; shape)]
|
||||||
|
|
||||||
(log/info :hint "Repairing shape :component-not-found" :id (:id shape) :name (:name shape) :page-id page-id)
|
(log/info :hint "Repairing shape :component-not-found" :id (:id shape) :name (:name shape) :page-id page-id)
|
||||||
(-> (pcb/empty-changes nil page-id)
|
(-> (pcb/empty-changes nil page-id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue