uranusjr commented on code in PR #23924:
URL: https://github.com/apache/airflow/pull/23924#discussion_r882347348


##########
airflow/www/views.py:
##########
@@ -258,7 +258,11 @@ def task_group_to_grid(task_item_or_group, dag, dag_runs, 
session):
     if isinstance(task_item_or_group, AbstractOperator):
         return {
             'id': task_item_or_group.task_id,
-            'instances': [wwwutils.get_task_summary(dr, task_item_or_group, 
session) for dr in dag_runs],
+            'instances': [
+                ts
+                for ts in (wwwutils.get_task_summary(dr, task_item_or_group, 
session) for dr in dag_runs)
+                if ts is not None
+            ],

Review Comment:
   FWIW if we don’t need to care about empty summary (or if we’re OK to also 
filter those out), we can simply do
   
   ```python
   filter(None, (...))
   ```



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