Skip to content

Commit

Permalink
Fix is_parent_mapped value by checking if any of the parent tg is map…
Browse files Browse the repository at this point in the history
…ped (apache#34587)
  • Loading branch information
hussein-awala authored Sep 25, 2023
1 parent 556791b commit 97916ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,14 @@ def set_overall_state(record):
**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)
Expand Down

0 comments on commit 97916ba

Please sign in to comment.