From 1e248c7177e053ba3543446c7b1a191ff0df086c Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Wed, 22 Oct 2025 16:13:40 +0200 Subject: [PATCH] :bug: Fix demo accounts creation --- backend/src/app/rpc/commands/demo.clj | 1 + backend/src/app/rpc/commands/profile.clj | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/app/rpc/commands/demo.clj b/backend/src/app/rpc/commands/demo.clj index 005ae170fa..d6825a3f68 100644 --- a/backend/src/app/rpc/commands/demo.clj +++ b/backend/src/app/rpc/commands/demo.clj @@ -45,6 +45,7 @@ params {:email email :fullname fullname :is-active true + :is-demo true :deleted-at (ct/in-future (cf/get-deletion-delay)) :password (derive-password password) :props {}} diff --git a/backend/src/app/rpc/commands/profile.clj b/backend/src/app/rpc/commands/profile.clj index b078c2adad..2998f6be8a 100644 --- a/backend/src/app/rpc/commands/profile.clj +++ b/backend/src/app/rpc/commands/profile.clj @@ -107,7 +107,9 @@ (defn get-profile "Get profile by id. Throws not-found exception if no profile found." [conn id & {:as opts}] - (-> (db/get-by-id conn :profile id opts) + ;; NOTE: We need to set ::db/remove-deleted to false because demo profiles + ;; are created with a set deleted-at value + (-> (db/get-by-id conn :profile id (assoc opts ::db/remove-deleted false)) (decode-row))) ;; --- MUTATION: Update Profile (own)