0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00

🐛 Fix srepl get-file helper (add support for pointer map)

This commit is contained in:
Andrey Antukh 2023-05-11 07:57:31 +02:00
parent 049ebdd542
commit 97d2af048c

View file

@ -58,10 +58,12 @@
(defn get-file (defn get-file
"Get the migrated data of one file." "Get the migrated data of one file."
[system id] [system id]
(-> (:app.db/pool system) (db/with-atomic [conn (:app.db/pool system)]
(db/get-by-id :file id) (binding [pmap/*load-fn* (partial files/load-pointer conn id)]
(-> (db/get-by-id conn :file id)
(update :data blob/decode) (update :data blob/decode)
(update :data pmg/migrate-data))) (update :data pmg/migrate-data)
(files/process-pointers deref)))))
(defn update-file! (defn update-file!
"Apply a function to the data of one file. Optionally save the changes or not. "Apply a function to the data of one file. Optionally save the changes or not.