vincbeck commented on code in PR #69768:
URL: https://github.com/apache/airflow/pull/69768#discussion_r3614847671


##########
airflow-core/src/airflow/cli/commands/team_command.py:
##########
@@ -118,9 +135,19 @@ def team_delete(args, *, session=NEW_SESSION):
         associations.append(f"{variable_count} variable(s)")
 
     # Check pool associations
-    if pool_count := 
session.scalar(select(func.count(Pool.id)).where(Pool.team_name == team.name)):
+    if pool_count := session.scalar(
+        select(func.count(Pool.id)).where(
+            Pool.team_name == team.name,
+            Pool.pool != Pool.get_default_team_pool_name(team.name),
+        )
+    ):
         associations.append(f"{pool_count} pool(s)")
 
+    default_pool = session.scalar(select(Pool).where(Pool.pool == 
Pool.get_default_team_pool_name(team.name)))

Review Comment:
   That's an edge case but could be named `default_pool_marketing` and be 
global. We should check that the pool is also associated to the team



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to