This is an automated email from the ASF dual-hosted git repository.

bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 97916ba45c Fix is_parent_mapped value by checking if any of the parent 
tg is mapped (#34587)
97916ba45c is described below

commit 97916ba45ccf73185a5fbf50270a493369da0344
Author: Hussein Awala <[email protected]>
AuthorDate: Mon Sep 25 18:26:32 2023 +0200

    Fix is_parent_mapped value by checking if any of the parent tg is mapped 
(#34587)
---
 airflow/www/views.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/airflow/www/views.py b/airflow/www/views.py
index f3511fc41c..ba6d4045c5 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -426,9 +426,14 @@ def dag_to_grid(dag: DagModel, dag_runs: Sequence[DagRun], 
session: Session):
                 **setup_teardown_type,
             }
 
+        def check_group_is_mapped(tg: TaskGroup | None) -> bool:
+            if tg is None:
+                return False
+            return isinstance(tg, MappedTaskGroup) or 
check_group_is_mapped(tg.parent_group)
+
         # Task Group
         task_group = item
-        group_is_mapped = isinstance(task_group, MappedTaskGroup)
+        group_is_mapped = check_group_is_mapped(task_group)
 
         children = [
             task_group_to_grid(child, grouped_tis, 
is_parent_mapped=group_is_mapped)

Reply via email to