diff --git a/backend/src/app/rpc/commands/nitrate.clj b/backend/src/app/rpc/commands/nitrate.clj index 71eaedb2b0..5b77d68240 100644 --- a/backend/src/app/rpc/commands/nitrate.clj +++ b/backend/src/app/rpc/commands/nitrate.clj @@ -108,17 +108,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) @@ -146,8 +135,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))