Skip to content

Commit

Permalink
Don't iterate tis list twice for no reason (#26740)
Browse files Browse the repository at this point in the history
Just don't need this line.
  • Loading branch information
dstandish committed Sep 28, 2022
1 parent 8829c07 commit 4521188
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3175,9 +3175,7 @@ def landing_times(self, dag_id, session=None):
x=x_points[task_id],
y=scale_time_units(y_points[task_id], y_unit),
)

dates = sorted({ti.execution_date for ti in tis})
max_date = max(ti.execution_date for ti in tis) if dates else None
max_date = max(ti.execution_date for ti in tis) if tis else None

session.commit()

Expand Down

0 comments on commit 4521188

Please sign in to comment.