From 0547eebf85cf433dc9da0ac20203d310be417a81 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 18 Oct 2023 12:54:03 +0200 Subject: [PATCH] :bug: Set correct version on importing --- backend/src/app/rpc/commands/binfile.clj | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/src/app/rpc/commands/binfile.clj b/backend/src/app/rpc/commands/binfile.clj index 99dd69a683..de6b184d0b 100644 --- a/backend/src/app/rpc/commands/binfile.clj +++ b/backend/src/app/rpc/commands/binfile.clj @@ -680,12 +680,17 @@ (let [file-id' (lookup-index file-id) data (-> (:data file) - (assoc :id file-id') + (assoc :id file-id')) + + data (if (> (:version data) cfd/version) + (assoc data :version cfd/version) + data) + + data (-> data (cond-> migrate? (pmg/migrate-data)) (update :pages-index relink-shapes) (update :components relink-shapes) (update :media relink-media) - (assoc :version cfd/version) (postprocess-file)) params {:id file-id'