We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd09883 commit 549fac3Copy full SHA for 549fac3
airflow/www/views.py
@@ -3013,6 +3013,9 @@ def legacy_graph(self):
3013
def graph(self, dag_id: str, session: Session = NEW_SESSION):
3014
"""Redirect to the replacement - grid + graph. Kept for backwards compatibility."""
3015
dag = get_airflow_app().dag_bag.get_dag(dag_id, session=session)
3016
+ if not dag:
3017
+ flash(f'DAG "{dag_id}" seems to be missing from DagBag.', "error")
3018
+ return redirect(url_for("Airflow.index"))
3019
dt_nr_dr_data = get_date_time_num_runs_dag_runs_form_data(request, session, dag)
3020
dttm = dt_nr_dr_data["dttm"]
3021
dag_run = dag.get_dagrun(execution_date=dttm)
0 commit comments