mirror of
https://github.com/penpot/penpot.git
synced 2025-06-29 02:26:58 +02:00
🐛 Fix problem with importation process
This commit is contained in:
parent
7b887d3188
commit
a2fbf93ec1
2 changed files with 11 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue