jedcunningham commented on code in PR #38340:
URL: https://github.com/apache/airflow/pull/38340#discussion_r1532783318


##########
airflow/www/views.py:
##########
@@ -3695,8 +3695,16 @@ def next_run_datasets(self, dag_id):
         with create_session() as session:
             dag_model = DagModel.get_dagmodel(dag_id, session=session)
 
+            latest_run = dag_model.get_last_dagrun()
+
             events = [
-                dict(info)
+                {
+                    "id": info.id,
+                    "uri": info.uri,
+                    "lastUpdate": info.lastUpdate
+                    if not latest_run or (info.lastUpdate and info.lastUpdate 
> latest_run.execution_date)
+                    else None,

Review Comment:
   Hmm, this should probably just be a filter in the db query instead.



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