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 2021/09/15 09:13:58 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #18244: Make sure task view can be rendered without a ti

uranusjr commented on a change in pull request #18244:
URL: https://github.com/apache/airflow/pull/18244#discussion_r708997645



##########
File path: airflow/www/templates/airflow/task.html
##########
@@ -43,18 +43,22 @@ <h5>Dependencies Blocking Task From Getting Scheduled</h5>
       <h5>Attribute: {{ attr }}</h5>
       {{ value }}
     {% endfor %}
-    <h5>Task Instance Attributes</h5>
-    <table class="table table-striped table-bordered">
-      <tr>
-        <th>Attribute</th>
-        <th>Value</th>
-      </tr>
-      {% for attr, value in ti_attrs %}
+    {% if ti_attrs is none %}
+      <h5>No Task Instance Available</h5>
+    {% else %}
+      <h5>Task Instance Attributes</h5>
+      <table class="table table-striped table-bordered">
         <tr>
-          <td>{{ attr }}</td>
-          <td class="code js-ti-attr">{{ value }}</td>
+          <th>Attribute</th>
+          <th>Value</th>
         </tr>
-      {% endfor %}
+        {% for attr, value in ti_attrs %}
+          <tr>
+            <td>{{ attr }}</td>
+            <td class="code js-ti-attr">{{ value }}</td>
+          </tr>
+        {% endfor %}
+      {% endif %}

Review comment:
       Oops, thanks for spotting this.




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

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org