Lee-W commented on code in PR #46460:
URL: https://github.com/apache/airflow/pull/46460#discussion_r1952074455


##########
airflow/models/dag.py:
##########
@@ -188,10 +188,10 @@ def get_last_dagrun(dag_id, session, 
include_externally_triggered=False):
     Overridden DagRuns are ignored.
     """
     DR = DagRun
-    query = select(DR).where(DR.dag_id == dag_id, DR.logical_date.is_not(None))
+    query = select(DR).where(DR.dag_id == dag_id, DR.run_after.is_not(None))
     if not include_externally_triggered:
         query = query.where(DR.external_trigger == expression.false())
-    query = query.order_by(DR.logical_date.desc())
+    query = query.order_by(DR.run_after.desc())

Review Comment:
   or should we include asset-triggered dag if nothing is found?



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