Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrejeambrun committed Sep 30, 2024
1 parent 78623ae commit 05a8004
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions airflow/api_fastapi/db/dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@
and DagRun.dag_id == latest_dag_run_per_dag_id_cte.c.dag_id,
isouter=True,
)
.order_by(DagModel.dag_id)
)
4 changes: 4 additions & 0 deletions airflow/api_fastapi/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ def to_orm(self, select: Select) -> Select:
# MySQL does not support `nullslast`, and True/False ordering depends on the
# database implementation.
nullscheck = case((column.isnot(None), 0), else_=1)

# Reset default sorting
select = select.order_by(None)

if self.value[0] == "-":
return select.order_by(nullscheck, column.desc(), DagModel.dag_id.desc())
else:
Expand Down

0 comments on commit 05a8004

Please sign in to comment.