You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/09/14 21:36:04 UTC

[GitHub] r39132 closed pull request #3897: [AIRFLOW-2263] Fix 500 for null DAG

r39132 closed pull request #3897: [AIRFLOW-2263] Fix 500 for null DAG
URL: https://github.com/apache/incubator-airflow/pull/3897
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/www/views.py b/airflow/www/views.py
index aa2530e458..7e79c0df7f 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -1379,6 +1379,8 @@ def tree(self, session=None):
         dag_id = request.args.get('dag_id')
         blur = conf.getboolean('webserver', 'demo_mode')
         dag = dagbag.get_dag(dag_id)
+        if dag is None:
+            abort(404)
         if dag_id not in dagbag.dags:
             flash('DAG "{0}" seems to be missing.'.format(dag_id), "error")
             return redirect('/admin/')


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Re: [GitHub] r39132 closed pull request #3897: [AIRFLOW-2263] Fix 500 for null DAG

Posted by Ry Walker <ry...@astronomer.io>.
unsubscribe

On Fri, Sep 14, 2018 at 5:36 PM GitBox <gi...@apache.org> wrote:

> r39132 closed pull request #3897: [AIRFLOW-2263] Fix 500 for null DAG
> URL: https://github.com/apache/incubator-airflow/pull/3897
>
>
>
>
> This is a PR merged from a forked repository.
> As GitHub hides the original diff on merge, it is displayed below for
> the sake of provenance:
>
> As this is a foreign pull request (from a fork), the diff is supplied
> below (as it won't show otherwise due to GitHub magic):
>
> diff --git a/airflow/www/views.py b/airflow/www/views.py
> index aa2530e458..7e79c0df7f 100644
> --- a/airflow/www/views.py
> +++ b/airflow/www/views.py
> @@ -1379,6 +1379,8 @@ def tree(self, session=None):
>          dag_id = request.args.get('dag_id')
>          blur = conf.getboolean('webserver', 'demo_mode')
>          dag = dagbag.get_dag(dag_id)
> +        if dag is None:
> +            abort(404)
>          if dag_id not in dagbag.dags:
>              flash('DAG "{0}" seems to be missing.'.format(dag_id),
> "error")
>              return redirect('/admin/')
>
>
>
>
> ----------------------------------------------------------------
> This is an automated message from the Apache Git Service.
> To respond to the message, please log on GitHub and use the
> URL above to go to the specific comment.
>
> For queries about this service, please contact Infrastructure at:
> users@infra.apache.org
>
>
> With regards,
> Apache Git Services
>


-- 

*Ry Walker* | CEO, Astronomer <http://www.astronomer.io/> | 513.417.2163 |
@rywalker <http://twitter.com/rywalker> | LinkedIn
<http://www.linkedin.com/in/rywalker>