SameerMesiah97 commented on code in PR #69768:
URL: https://github.com/apache/airflow/pull/69768#discussion_r3642116992
##########
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:
And additional check has been added to the where clause to ensure that the
select pool is associated with 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]