diff --git a/airflow/api_connexion/endpoints/task_instance_endpoint.py b/airflow/api_connexion/endpoints/task_instance_endpoint.py index c1e0ea97688ff..70bebcb1b30d4 100644 --- a/airflow/api_connexion/endpoints/task_instance_endpoint.py +++ b/airflow/api_connexion/endpoints/task_instance_endpoint.py @@ -441,7 +441,9 @@ def get_task_instances_batch(session: Session = NEW_SESSION) -> APIResponse: ), isouter=True, ).add_columns(SlaMiss) - ti_query = base_query.options(joinedload(TI.rendered_task_instance_fields)) + ti_query = base_query.options( + joinedload(TI.rendered_task_instance_fields), joinedload(TI.task_instance_note) + ) # using execute because we want the SlaMiss entity. Scalars don't return None for missing entities task_instances = session.execute(ti_query).all()