0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 06:58:58 -05:00

🐛 Skip validation in files with components v1

This commit is contained in:
Andrés Moya 2023-11-21 09:28:44 +01:00 committed by Andrey Antukh
parent fc312ee6dc
commit 3dc629d2ad

View file

@ -461,15 +461,16 @@
"Validate full referential integrity and semantic coherence on file data.
Raises a validation exception on first error found."
[{:keys [data] :as file} libraries]
[{:keys [data features] :as file} libraries]
(when (contains? features "components/v2")
(doseq [page (filter :id (ctpl/pages-seq data))]
(validate-shape! uuid/zero file page libraries))
(doseq [page (filter :id (ctpl/pages-seq data))]
(validate-shape! uuid/zero file page libraries))
(doseq [component (vals (:components data))]
(validate-component! component file))
(doseq [component (vals (:components data))]
(validate-component! component file)))
file)
file)
(defn validate-file
"Validate structure, referencial integrity and semantic coherence of