mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
✨ Simplify feature handling on get-file
This commit is contained in:
parent
47baa21d53
commit
ac20451ae7
1 changed files with 2 additions and 5 deletions
|
@ -224,11 +224,8 @@
|
||||||
(defn- migrate-file
|
(defn- migrate-file
|
||||||
[{:keys [::db/conn] :as cfg} {:keys [id] :as file}]
|
[{:keys [::db/conn] :as cfg} {:keys [id] :as file}]
|
||||||
(binding [pmap/*load-fn* (partial feat.fdata/load-pointer cfg id)
|
(binding [pmap/*load-fn* (partial feat.fdata/load-pointer cfg id)
|
||||||
pmap/*tracked* (pmap/create-tracked)
|
pmap/*tracked* (pmap/create-tracked)]
|
||||||
cfeat/*new* (atom #{})]
|
(let [file (fmg/migrate-file file)]
|
||||||
(let [file (-> (fmg/migrate-file file)
|
|
||||||
(update :features into (deref cfeat/*new*))
|
|
||||||
(update :features cfeat/migrate-legacy-features))]
|
|
||||||
|
|
||||||
;; NOTE: when file is migrated, we break the rule of no perform
|
;; NOTE: when file is migrated, we break the rule of no perform
|
||||||
;; mutations on get operations and update the file with all
|
;; mutations on get operations and update the file with all
|
||||||
|
|
Loading…
Add table
Reference in a new issue