Skip to content

Commit

Permalink
Properly treating new DAGs in Tree View
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Kerzhner committed Sep 24, 2015
1 parent 34d4bdb commit 8f64275
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 + 2 * dag.schedule_interval) 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 8f64275

Please sign in to comment.