pierrejeambrun commented on code in PR #42959:
URL: https://github.com/apache/airflow/pull/42959#discussion_r1806723451
##########
airflow/api_fastapi/core_api/routes/public/dags.py:
##########
@@ -70,7 +72,13 @@ async def get_dags(
SortParam,
Depends(
SortParam(
- ["dag_id", "dag_display_name", "next_dagrun",
"last_run_state", "last_run_start_date"],
+ {
+ "dag_id": DagModel.dag_id,
+ "dag_display_name": DagModel.dag_display_name,
+ "next_dagrun": DagModel.next_dagrun,
+ "last_run_state": DagRun.state,
+ "last_run_start_date": DagRun.start_date,
+ },
Review Comment:
Most of this is not necessay. By default if the attribute is not in the
mapping it will take it from the model. No need to duplicate it.
--
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]