From d5f5c440dd594166b1ba1d3655f8d6ba5781b8c1 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 4 Sep 2024 11:09:05 +0200 Subject: [PATCH] :bug: Fix issues with srepl helper for profile deletion in bulk --- backend/src/app/srepl/main.clj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/app/srepl/main.clj b/backend/src/app/srepl/main.clj index 98cb5b9cb..922466675 100644 --- a/backend/src/app/srepl/main.clj +++ b/backend/src/app/srepl/main.clj @@ -727,13 +727,15 @@ deleted 0 total 0] (if-let [email (first emails)] - (if-let [profile (db/get* system :profile - {:email (str/lower email)} - {::db/remove-deleted false})] + (if-let [profile (some-> (db/get* system :profile + {:email (str/lower email)} + {::db/remove-deleted false}) + (profile/decode-row))] (do (audit/insert! system {::audit/name "delete-profile" ::audit/type "action" + ::audit/profile-id (:id profile) ::audit/tracked-at deleted-at ::audit/props (audit/profile->props profile) ::audit/context {:triggered-by "srepl"