0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

🐛 Clean fdata from nils

This commit is contained in:
Andrey Antukh 2023-11-21 11:37:20 +01:00 committed by Andrés Moya
parent 2e6d57e57d
commit f66228c19d
4 changed files with 7 additions and 4 deletions

View file

@ -290,7 +290,8 @@
(-> data (-> data
(blob/decode) (blob/decode)
(assoc :id (:id file)) (assoc :id (:id file))
(pmg/migrate-data)))) (pmg/migrate-data)
(d/without-nils))))
;; WARNING: this ruins performance; maybe we need to find ;; WARNING: this ruins performance; maybe we need to find
;; some other way to do general validation ;; some other way to do general validation

View file

@ -618,7 +618,7 @@
(defmethod process-change :del-media (defmethod process-change :del-media
[data {:keys [id]}] [data {:keys [id]}]
(update data :media dissoc id)) (d/update-when data :media dissoc id))
;; -- Components ;; -- Components

View file

@ -6,4 +6,4 @@
(ns app.common.files.defaults) (ns app.common.files.defaults)
(def version 36) (def version 37)

View file

@ -651,7 +651,6 @@
(migrate) (migrate)
(assoc :version 35))) (assoc :version 35)))
(defmethod migrate 36 (defmethod migrate 36
[data] [data]
(letfn [(update-container [container] (letfn [(update-container [container]
@ -663,3 +662,6 @@
(update :pages-index update-vals update-container) (update :pages-index update-vals update-container)
(update :components update-vals update-container)))) (update :components update-vals update-container))))
(defmethod migrate 37
[data]
(d/without-nils data))