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

ephraimanierobi pushed a commit to branch v2-7-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit ba1b1da078da3e3037e95fe0a393eb58d5d7c8ba
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)
    
    (cherry picked from commit 97916ba45ccf73185a5fbf50270a493369da0344)
---
 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 390b2396fb..ba275416d2 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -425,9 +425,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