bbovenzi commented on code in PR #30935:
URL: https://github.com/apache/airflow/pull/30935#discussion_r1182866414


##########
airflow/www/views.py:
##########
@@ -776,11 +776,28 @@ def index(self):
                 current_dags = all_dags
                 num_of_all_dags = all_dags_count
 
-            sort_column = DagModel.__table__.c.get(arg_sorting_key)
-            if sort_column is not None:
+            if arg_sorting_key == "last_dagrun":
+                dag_run_subquery = (
+                    session.query(
+                        DagRun.dag_id,
+                        
sqla.func.max(DagRun.execution_date).label("max_execution_date"),

Review Comment:
   If there is no latest dag run, those dags should be shown last for either 
asc or desc sort.



-- 
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]

Reply via email to