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/08/15 18:13:48 UTC

[GitHub] feng-tao closed pull request #3728: [AIRFLOW-2883] Not search dag owner if owners are missing

feng-tao closed pull request #3728: [AIRFLOW-2883] Not search dag owner if owners are missing
URL: https://github.com/apache/incubator-airflow/pull/3728
 
 
   

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 3e41d2d02a..2712160b30 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -2127,8 +2127,9 @@ def get_int_arg(value, default=0):
             }
 
             all_dag_ids = (set([dag.dag_id for dag in orm_dags.values()
-                                if lower_search_query in dag.dag_id.lower() or
-                                lower_search_query in dag.owners.lower()]) |
+                                if dag.owners is not None and
+                                (lower_search_query in dag.dag_id.lower() or
+                                lower_search_query in dag.owners.lower())]) |
                            set(webserver_dags_filtered.keys()))
 
             sorted_dag_ids = sorted(all_dag_ids)
diff --git a/airflow/www_rbac/views.py b/airflow/www_rbac/views.py
index a9947ae096..5169a3a268 100644
--- a/airflow/www_rbac/views.py
+++ b/airflow/www_rbac/views.py
@@ -231,8 +231,9 @@ def get_int_arg(value, default=0):
             }
 
             all_dag_ids = (set([dag.dag_id for dag in orm_dags.values()
-                                if lower_search_query in dag.dag_id.lower() or
-                                lower_search_query in dag.owners.lower()]) |
+                                if dag.owners is not None and
+                                (lower_search_query in dag.dag_id.lower() or
+                                lower_search_query in dag.owners.lower())]) |
                            set(webserver_dags_filtered.keys()))
 
             sorted_dag_ids = sorted(all_dag_ids)


 

----------------------------------------------------------------
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