0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 04:49:03 -05:00

🐛 Fix opts passing on process-file! srepl helper

This commit is contained in:
Andrey Antukh 2024-03-11 10:59:38 +01:00 committed by Andrés Moya
parent fb58d7a4cc
commit b30d525400

View file

@ -378,11 +378,11 @@
(defn process-file! (defn process-file!
"Apply a function to the file. Optionally save the changes or not. "Apply a function to the file. Optionally save the changes or not.
The function receives the decoded and migrated file data." The function receives the decoded and migrated file data."
[file-id update-fn & {:keys [rollback?] :or {rollback? true}}] [file-id update-fn & {:keys [rollback?] :or {rollback? true} :as opts}]
(db/tx-run! (assoc main/system ::db/rollback rollback?) (db/tx-run! (assoc main/system ::db/rollback rollback?)
(fn [system] (fn [system]
(binding [h/*system* system] (binding [h/*system* system]
(h/process-file! system file-id update-fn))))) (h/process-file! system file-id update-fn opts)))))
(defn process-team-files! (defn process-team-files!
"Apply a function to each file of the specified team." "Apply a function to each file of the specified team."