From 347a52d51465b35d77b48b6d1a3fbd47c8b861f0 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 22 Oct 2026 11:07:07 +0200 Subject: [PATCH] :bug: Keep Path out of update-team-photo audit props (#12530) Nitrate encodes audit chunks as JSON and cannot serialize java.nio.file.Path; mirror update-profile-photo and replace the upload map with safe props. --- backend/src/app/rpc/commands/teams.clj | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/src/app/rpc/commands/teams.clj b/backend/src/app/rpc/commands/teams.clj index a39ba9572b..041516d3a9 100644 --- a/backend/src/app/rpc/commands/teams.clj +++ b/backend/src/app/rpc/commands/teams.clj @@ -1104,7 +1104,7 @@ (update-team-photo cfg (assoc params :profile-id profile-id))) (defn update-team-photo - [{:keys [::db/pool ::sto/storage] :as cfg} {:keys [profile-id team-id] :as params}] + [{:keys [::db/pool ::sto/storage] :as cfg} {:keys [profile-id team-id file] :as params}] (let [team (get-team pool :profile-id profile-id :team-id team-id) photo (profile/upload-photo cfg params)] @@ -1120,4 +1120,10 @@ {:photo-id (:id photo)} {:id team-id}) - (assoc team :photo-id (:id photo)))) + (rph/with-meta (assoc team :photo-id (:id photo)) + {::audit/replace-props + {:team-id team-id + :file-name (:filename file) + :file-size (:size file) + :file-path (str (:path file)) + :file-mtype (:mtype file)}})))