From 9f2dc06c959b5fd0c55e32550bce13e833b01feb Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 30 Sep 2025 13:49:30 +0200 Subject: [PATCH] :sparkles: Add missing srepl helper for disable objects-map feat --- backend/src/app/features/fdata.clj | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/backend/src/app/features/fdata.clj b/backend/src/app/features/fdata.clj index 43cf612068..50ebb10b57 100644 --- a/backend/src/app/features/fdata.clj +++ b/backend/src/app/features/fdata.clj @@ -49,6 +49,20 @@ (update :data update-data) (update :features conj "fdata/objects-map")))) +(defn disable-objects-map + [file & _opts] + (let [update-page + (fn [page] + (update page :objects #(into {} %))) + + update-data + (fn [fdata] + (update fdata :pages-index d/update-vals update-page))] + + (-> file + (update :data update-data) + (update :features disj "fdata/objects-map")))) + (defn process-objects "Apply a function to all objects-map on the file. Usualy used for convert the objects-map instances to plain maps"