ashb commented on code in PR #23813:
URL: https://github.com/apache/airflow/pull/23813#discussion_r877498895


##########
airflow/www/utils.py:
##########
@@ -127,13 +128,21 @@ def get_mapped_summary(parent_instance, task_instances):
     }
 
 
-def encode_ti(
-    task_instance: Optional[TaskInstance], is_mapped: Optional[bool], session: 
Optional[Session]
-) -> Optional[Dict[str, Any]]:
+def encode_ti(dag_run: DagRun, task, session: Session) -> Optional[Dict[str, 
Any]]:
+    task_instance = (
+        session.query(TaskInstance)
+        .filter(
+            TaskInstance.dag_id == task.dag_id,
+            TaskInstance.run_id == dag_run.run_id,
+            TaskInstance.task_id == task.task_id,
+            TaskInstance.map_index <= 0,

Review Comment:
   Probably add a comment to make it clear it's explicit (and not a typo to 
find only unmapped tis - ` < 0`)



-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to