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


##########
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:
   Alternative fix here: https://github.com/apache/airflow/pull/23932 - I think 
we shoudl slowly start add typing also to views.py as this precisely the kind 
of errors that would have been prevented if we had typing here in the first 
place. 



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