mmuru opened a new issue #8752:
URL: https://github.com/apache/airflow/issues/8752


   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   This questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**: airflow 1.10.10 
   
   
   **Environment**:
   
   - **OS** (e.g. from /etc/os-release): Mac 
   
   **What happened**:
   `
   Ooops! throws exception
   File 
"/Users/muru/opensrc/py36/airflow_110/venv368/lib/python3.6/site-packages/airflow/www/templates/airflow/dags.html",
 line 84, in block "body"
       <a href="{{ url_for('airflow.'+ dag.get_default_view(), 
dag_id=dag.dag_id) }}" title="{{ dag.description[0:80] + '...' if 
dag.description|length > 80 else dag.description }}">
   TypeError: object of type 'NoneType' has no len()
   `
   
   **What you expected to happen**:
   Should able to load page without errors or exceptions.
   <!-- What do you think went wrong? -->
   The description column in dag table can be null. But in the dags.html, 
should check dag.decription is not null before perform length filter. 
   
   
   **How to reproduce it**:
   migrate airflow 1.9.0 to 1.10.10
   Perform airflow upgradedb 
   start airflow webserver 
   launch and open http://localhost:8080/
   
   **Anything else we need to know**:
   Line 84 in airflow/www/templates/airflow/dags.html file, replace the 
condition
   `if dag.description|length > 80 
   change to
   if dag.description and dag.description|length > 80`
   <!--
   
   How often does this problem occur? Once? Every time etc?
   
   Always
   
   Any relevant logs to include? Put them here in side a detail tag:
   <details><summary>x.log</summary> lots of stuff </details>
   
   -->
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to