diff --git a/CHANGES.md b/CHANGES.md index 959130e68..a6cf80ca3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -50,6 +50,7 @@ - Fix grid not being clipped in frames [#3365](https://github.com/penpot/penpot/issues/3365) - Fix cut/delete text layer when while creating text [Taiga #5602](https://tree.taiga.io/project/penpot/issue/5602) - Fix picking a gradient color in recent colors for a new color in the assets tab [Taiga #5601](https://tree.taiga.io/project/penpot/issue/5601) +- Fix problem with importation process [Taiga #5597](https://tree.taiga.io/project/penpot/issue/5597) ### :arrow_up: Deps updates diff --git a/backend/src/app/rpc/commands/files_temp.clj b/backend/src/app/rpc/commands/files_temp.clj index 4eb24cca2..85902a0fa 100644 --- a/backend/src/app/rpc/commands/files_temp.clj +++ b/backend/src/app/rpc/commands/files_temp.clj @@ -86,16 +86,16 @@ (ex/raise :type :validation :code :cant-persist-already-persisted-file)) - (loop [revs (seq revs) - data (blob/decode (:data file))] - (if-let [rev (first revs)] - (recur (rest revs) - (->> rev :changes blob/decode (cp/process-changes data))) - (db/update! conn :file - {:deleted-at nil - :revn revn - :data (blob/encode data)} - {:id id}))) + + (let [data + (->> revs + (mapcat #(->> % :changes blob/decode)) + (cp/process-changes (blob/decode (:data file))))] + (db/update! conn :file + {:deleted-at nil + :revn revn + :data (blob/encode data)} + {:id id})) nil)) (s/def ::persist-temp-file