SameerMesiah97 commented on code in PR #69768:
URL: https://github.com/apache/airflow/pull/69768#discussion_r3642109328
##########
airflow-core/src/airflow/cli/commands/team_command.py:
##########
@@ -74,8 +75,24 @@ def team_create(args, *, session=NEW_SESSION):
try:
session.add(new_team)
+ session.flush()
Review Comment:
Yes. This was added because without it a foreign key violation was occuring
as `Pool.create_or_update_pool()` creates a pool referencing `team_name`. Since
the Team was just added in the same transaction, it needs to be flushed before
that foreign key can be resolved.
--
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]