uranusjr commented on code in PR #33270:
URL: https://github.com/apache/airflow/pull/33270#discussion_r1289662426
##########
airflow/www/views.py:
##########
@@ -3251,8 +3251,7 @@ def duration(self, dag_id: str, session: Session =
NEW_SESSION):
y=scale_time_units(cumulative_y[task_id], cum_y_unit),
)
- dates = sorted({ti.execution_date for ti in task_instances})
- max_date = max(ti.execution_date for ti in task_instances) if dates
else None
+ max_date = max((ti.execution_date for ti in task_instances),
default=None)
Review Comment:
Begs the question why we needed to sort the dates in the first place.
Leftover code maybe, who knows.
--
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]