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:
parent
049ebdd542
commit
97d2af048c
1 changed files with 6 additions and 4 deletions
|
@ -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.
|
||||||
|
|
Loading…
Add table
Reference in a new issue