From b2c9e08d428c27afcc2bad9f0b8d9b30137522a1 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Fri, 17 Apr 2026 11:36:39 +0200 Subject: [PATCH] :bug: Fix bad check on leave nitrate org --- backend/src/app/rpc/commands/nitrate.clj | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/backend/src/app/rpc/commands/nitrate.clj b/backend/src/app/rpc/commands/nitrate.clj index 62d25a781b..6bd5a7f855 100644 --- a/backend/src/app/rpc/commands/nitrate.clj +++ b/backend/src/app/rpc/commands/nitrate.clj @@ -133,17 +133,6 @@ valid-teams-to-leave-ids (into valid-teams-to-transfer-ids valid-teams-to-exit-ids) - ;; Get all the teams ids - all-teams-ids (into #{} d/xf:map-id (:teams org-summary)) - - ;; Get all the ids of the teams that will be processed: - ;; all the ids on teams-to-leave, teams-to-delete and default-team-id - selected-team-ids (-> (into #{default-team-id} teams-to-delete) - (into d/xf:map-id teams-to-leave)) - - ;; Check that we are processing all the teams - all-teams-selected? (= all-teams-ids selected-team-ids) - default-team-files-count (-> (db/exec-one! conn [sql:get-team-files-count default-team-id]) :total) delete-default-team? (= default-team-files-count 0) @@ -171,8 +160,7 @@ (when (or (not valid-teams-to-delete?) (not valid-teams-to-leave?) - (not valid-default-team-id?) - (not all-teams-selected?)) + (not valid-default-team-id?)) (ex/raise :type :validation :code :not-valid-teams))