hussein-awala commented on code in PR #32011:
URL: https://github.com/apache/airflow/pull/32011#discussion_r1235688311


##########
airflow/www/views.py:
##########
@@ -1419,7 +1419,11 @@ def rendered_templates(self, session):
             ti.dag_run = DagRun(dag_id=dag_id, execution_date=dttm)
         else:
             ti = dag_run.get_task_instance(task_id=task_id, 
map_index=map_index, session=session)
-            ti.refresh_from_task(raw_task)
+            if ti:
+                ti.refresh_from_task(raw_task)
+            else:
+                # When there is no task instance with the given map_index
+                ti = TaskInstance(raw_task, map_index=map_index)

Review Comment:
   could you check it now?
   Here is the result on the UI:
   
![image](https://github.com/apache/airflow/assets/21311487/c78d5f55-b6b7-45d4-b146-b777fd3669cb)
   



-- 
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: [email protected]

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

Reply via email to