Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ def get_task_group_children_getter() -> Callable:
def task_group_to_dict(task_item_or_group, parent_group_is_mapped=False):
"""Create a nested dict representation of this TaskGroup and its children used to construct the Graph."""
if isinstance(task := task_item_or_group, (SerializedBaseOperator, MappedOperator)):
# we explicitly want the short task ID here, not the full doted notation if in a group
task_display_name = task.task_display_name if task.task_display_name != task.task_id else task.label
node_operator = {
"id": task.task_id,
"label": task.label,
"label": task_display_name,
"operator": task.operator_name,
"type": "task",
}
Expand All @@ -55,7 +57,7 @@ def task_group_to_dict(task_item_or_group, parent_group_is_mapped=False):
node_operator["is_mapped"] = True
return node_operator

task_group = task_item_or_group
task_group: TaskGroup = task_item_or_group
mapped = is_mapped(task_group)
children = [
task_group_to_dict(child, parent_group_is_mapped=parent_group_is_mapped or mapped)
Expand All @@ -72,7 +74,7 @@ def task_group_to_dict(task_item_or_group, parent_group_is_mapped=False):

return {
"id": task_group.group_id,
"label": task_group.label,
"label": task_group.group_display_name or task_group.label,
"tooltip": task_group.tooltip,
"is_mapped": mapped,
"children": children,
Expand Down
Loading