prabhusneha commented on code in PR #45420:
URL: https://github.com/apache/airflow/pull/45420#discussion_r1921610899
##########
airflow/api_fastapi/core_api/routes/public/dags.py:
##########
@@ -82,8 +93,25 @@ def get_dags(
session: SessionDep,
) -> DAGCollectionResponse:
"""Get all DAGs."""
+ dag_runs_select, total_entries = paginated_select(
+ statement=select(DagRun),
+ filters=[
+ dag_run_start_date_range,
+ dag_run_end_date_range,
+ dag_run_state,
+ ],
+ session=session,
+ )
+
dags_select, total_entries = paginated_select(
- statement=dags_select_with_latest_dag_run,
+ statement=generate_dag_select_query(
+ dag_runs_select.cte(),
+ use_outer_join=not (
+ is_range_filter_active(dag_run_start_date_range)
+ or is_range_filter_active(dag_run_end_date_range)
+ )
Review Comment:
Modified the code as per the suggestion.
--
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]