From c1348189d49f7b399127c4d9aad38002164d141d Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 23 Aug 2022 08:43:06 +0200 Subject: [PATCH] :bug: Fix path with images on binfile importation --- backend/src/app/rpc/commands/binfile.clj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/src/app/rpc/commands/binfile.clj b/backend/src/app/rpc/commands/binfile.clj index 6885f5cf58..764f0651e7 100644 --- a/backend/src/app/rpc/commands/binfile.clj +++ b/backend/src/app/rpc/commands/binfile.clj @@ -728,11 +728,16 @@ [data] (letfn [(process-map-form [form] (cond-> form - ;; Relink Image Shapes + ;; Relink image shapes (and (map? (:metadata form)) (= :image (:type form))) (update-in [:metadata :id] lookup-index) + ;; Relink paths with fill image + (and (map? (:fill-image form)) + (= :path (:type form))) + (update-in [:fill-image :id] lookup-index) + ;; This covers old shapes and the new :fills. (uuid? (:fill-color-ref-file form)) (update :fill-color-ref-file lookup-index)