From ac20451ae76e044343a3847e44e8802f9e50592a Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 15 Dec 2023 15:01:50 +0100 Subject: [PATCH] :sparkles: Simplify feature handling on get-file --- backend/src/app/rpc/commands/files.clj | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/backend/src/app/rpc/commands/files.clj b/backend/src/app/rpc/commands/files.clj index 30dd81cae1..096e961957 100644 --- a/backend/src/app/rpc/commands/files.clj +++ b/backend/src/app/rpc/commands/files.clj @@ -224,11 +224,8 @@ (defn- migrate-file [{:keys [::db/conn] :as cfg} {:keys [id] :as file}] (binding [pmap/*load-fn* (partial feat.fdata/load-pointer cfg id) - pmap/*tracked* (pmap/create-tracked) - cfeat/*new* (atom #{})] - (let [file (-> (fmg/migrate-file file) - (update :features into (deref cfeat/*new*)) - (update :features cfeat/migrate-legacy-features))] + pmap/*tracked* (pmap/create-tracked)] + (let [file (fmg/migrate-file file)] ;; NOTE: when file is migrated, we break the rule of no perform ;; mutations on get operations and update the file with all