Skip to content

Commit 31bca87

Browse files
committed
fix: make task_context transforms really work without a task-context
It's not enough to make it optional in the schema, the actual code also has to deal with its absence. Thanks @ErichDonGubler!
1 parent d57132e commit 31bca87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/taskgraph/transforms/task_context.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@
8585
@transforms.add
8686
def render_task(config, tasks):
8787
for task in tasks:
88-
sub_config = task.pop("task-context")
88+
sub_config = task.pop("task-context", None)
89+
if sub_config is None:
90+
yield task
91+
continue
8992
params_context = {}
9093
for var, path in sub_config.pop("from-parameters", {}).items():
9194
if isinstance(path, str):

0 commit comments

Comments
 (0)