From fb0e22c16b54c2b7d31f225c3876827c1debb3eb Mon Sep 17 00:00:00 2001 From: Alonso Torres Date: Wed, 12 Feb 2025 15:35:28 +0100 Subject: [PATCH] :bug: Fix problem with team permissions redirection (#5839) --- frontend/src/app/main/data/team.cljs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/data/team.cljs b/frontend/src/app/main/data/team.cljs index 7ffb46463..5ff7cf097 100644 --- a/frontend/src/app/main/data/team.cljs +++ b/frontend/src/app/main/data/team.cljs @@ -8,6 +8,7 @@ (:require [app.common.data :as d] [app.common.data.macros :as dm] + [app.common.exceptions :as ex] [app.common.logging :as log] [app.common.schema :as sm] [app.common.types.team :as ctt] @@ -118,8 +119,10 @@ (let [team-id (:current-team-id state) teams (get state :teams) team (get teams team-id)] - (rx/of (set-current-team team) - (fetch-members)))))) + (if (not team) + (rx/throw (ex/error :type :authentication)) + (rx/of (set-current-team team) + (fetch-members))))))) (defn initialize-team [team-id]