diff --git a/airflow/www/views.py b/airflow/www/views.py index e198e390ace7c..b5abe37cfdb17 100644 --- a/airflow/www/views.py +++ b/airflow/www/views.py @@ -797,9 +797,7 @@ def index(self): is_paused_count = dict( session.execute( - select(DagModel.is_paused, func.count(DagModel.dag_id)) - .group_by(DagModel.is_paused) - .select_from(all_dags) + select(DagModel.is_paused, func.count(DagModel.dag_id)).group_by(DagModel.is_paused) ).all() )