From e8a1c58c5d7b9e9d2c68cb057be0a176f43db6a7 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 13 Feb 2024 11:14:54 +0100 Subject: [PATCH] :bug: Fix incorrect change detection on srepl helper process-file --- backend/src/app/srepl/helpers.clj | 2 +- backend/src/app/srepl/main.clj | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/src/app/srepl/helpers.clj b/backend/src/app/srepl/helpers.clj index ba98c2968..9df761db0 100644 --- a/backend/src/app/srepl/helpers.clj +++ b/backend/src/app/srepl/helpers.clj @@ -168,7 +168,7 @@ (update-fn file libs opts) (update-fn file opts))] - (when (and (some? file) + (when (and (some? file') (not (identical? file file'))) (when validate? (cfv/validate-file-schema! file')) (let [file' (update file' :revn inc)] diff --git a/backend/src/app/srepl/main.clj b/backend/src/app/srepl/main.clj index 16e9a0905..9851af8a3 100644 --- a/backend/src/app/srepl/main.clj +++ b/backend/src/app/srepl/main.clj @@ -380,9 +380,6 @@ "Apply a function to all files in the database, reading them in batches. Do not change data. - The `on-file` parameter should be a function that receives the file - and the previous state and returns the new state. - Emits rollback at the end of operation." [on-file & {:keys [max-items start-at with-libraries?]}] (letfn [(get-candidates [conn]