From 055d8feceadc62f547bd18dcdd5561280f30d303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Tue, 21 Nov 2023 09:28:44 +0100 Subject: [PATCH] :bug: Skip validation in files with components v1 --- common/src/app/common/files/validate.cljc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/common/src/app/common/files/validate.cljc b/common/src/app/common/files/validate.cljc index e6fa1a897..2d7b27b55 100644 --- a/common/src/app/common/files/validate.cljc +++ b/common/src/app/common/files/validate.cljc @@ -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