You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bo...@apache.org on 2017/02/01 15:55:14 UTC

[04/14] incubator-airflow git commit: [AIRFLOW-806] UI should properly ignore DAG doc when it is None

[AIRFLOW-806] UI should properly ignore DAG doc when it is None

Check dag.doc_md before we try to convert it to
Markdown.

Closes #2020 from dhuang/AIRFLOW-806


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/6060f653
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/6060f653
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/6060f653

Branch: refs/heads/v1-8-test
Commit: 6060f653a1720a6255893ec7067d7e6eda1bffaf
Parents: f8d8dda
Author: Daniel Huang <da...@upsight.com>
Authored: Fri Jan 27 11:47:35 2017 +0100
Committer: Bolke de Bruin <bo...@xs4all.nl>
Committed: Fri Jan 27 11:47:38 2017 +0100

----------------------------------------------------------------------
 airflow/www/views.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/6060f653/airflow/www/views.py
----------------------------------------------------------------------
diff --git a/airflow/www/views.py b/airflow/www/views.py
index 800275a..86d74d4 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -1414,7 +1414,7 @@ class Airflow(BaseView):
             flash("No tasks found", "error")
         session.commit()
         session.close()
-        doc_md = markdown.markdown(dag.doc_md) if hasattr(dag, 'doc_md') else ''
+        doc_md = markdown.markdown(dag.doc_md) if hasattr(dag, 'doc_md') and dag.doc_md else ''
 
         return self.render(
             'airflow/graph.html',