From 6a2029ca3b1712ee2cdc883d132193c80cf4ab93 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Fri, 31 Oct 2025 08:56:34 +0100 Subject: [PATCH] :bug: Fix error comment message after the demo account creation (#7615) --- backend/src/app/rpc/commands/comments.clj | 2 +- backend/src/app/rpc/commands/teams.clj | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/src/app/rpc/commands/comments.clj b/backend/src/app/rpc/commands/comments.clj index b3cd18783e..2227b8d5c5 100644 --- a/backend/src/app/rpc/commands/comments.clj +++ b/backend/src/app/rpc/commands/comments.clj @@ -291,7 +291,7 @@ (defn- get-unread-comment-threads [cfg profile-id team-id] - (let [profile (-> (db/get cfg :profile {:id profile-id}) + (let [profile (-> (db/get cfg :profile {:id profile-id} ::db/remove-deleted false) (profile/decode-row)) notify (or (-> profile :props :notifications :dashboard-comments) :all) result (case notify diff --git a/backend/src/app/rpc/commands/teams.clj b/backend/src/app/rpc/commands/teams.clj index 68405f9bc5..3cd69c5b76 100644 --- a/backend/src/app/rpc/commands/teams.clj +++ b/backend/src/app/rpc/commands/teams.clj @@ -37,14 +37,14 @@ ;; --- Helpers & Specs (def ^:private sql:team-permissions - "select tpr.is_owner, + "SELECT tpr.is_owner, tpr.is_admin, tpr.can_edit - from team_profile_rel as tpr - join team as t on (t.id = tpr.team_id) - where tpr.profile_id = ? - and tpr.team_id = ? - and t.deleted_at is null") + FROM team_profile_rel AS tpr + JOIN team AS t ON (t.id = tpr.team_id) + WHERE tpr.profile_id = ? + AND tpr.team_id = ? + AND t.deleted_at IS NULL") (defn get-permissions [conn profile-id team-id]