Skip to content

Commit

Permalink
Merge pull request #455 from kerzhner/tree-view
Browse files Browse the repository at this point in the history
Changing the default base date of the Tree View
  • Loading branch information
mistercrunch committed Sep 24, 2015
2 parents 70b342f + 8f64275 commit 678987e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion airflow/www/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,11 @@ def tree(self):
num_runs = int(num_runs) if num_runs else 25

if not base_date:
base_date = dag.latest_execution_date or datetime.now()
# New DAGs will not have a latest execution date
if dag.latest_execution_date:
base_date = dag.latest_execution_date + 2 * dag.schedule_interval
else:
base_date = datetime.now()
else:
base_date = dateutil.parser.parse(base_date)
base_date = utils.round_time(base_date, dag.schedule_interval)
Expand Down

0 comments on commit 678987e

Please sign in to comment.