Skip to content

Commit

Permalink
Resolve RemovedIn20Warning in airflow task command (#39244)
Browse files Browse the repository at this point in the history
  • Loading branch information
dondaum committed May 4, 2024
1 parent 3d14213 commit dbdf743
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions airflow/cli/commands/task_command.py
Expand Up @@ -199,6 +199,8 @@ def _get_ti_db_access(
)
# TODO: Validate map_index is in range?
ti = TaskInstance(task, run_id=dag_run.run_id, map_index=map_index)
if dag_run in session:
session.add(ti)
ti.dag_run = dag_run
else:
ti = ti_or_none
Expand Down

0 comments on commit dbdf743

Please sign in to comment.