Skip to content

Commit d7545fa

Browse files
andystaplesCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 156d54d commit d7545fa

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

durabletask/worker.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,10 +2229,13 @@ def process_event(
22292229

22302230
# Store the parent orchestration instance ID (set for
22312231
# sub-orchestrations; absent for top-level orchestrations)
2232-
if event.executionStarted.HasField("parentInstance") and \
2233-
event.executionStarted.parentInstance.HasField("orchestrationInstance"):
2232+
if (
2233+
event.executionStarted.HasField("parentInstance")
2234+
and event.executionStarted.parentInstance.HasField("orchestrationInstance")
2235+
):
22342236
ctx._parent_instance_id = ( # pyright: ignore[reportPrivateUsage]
2235-
event.executionStarted.parentInstance.orchestrationInstance.instanceId)
2237+
event.executionStarted.parentInstance.orchestrationInstance.instanceId
2238+
)
22362239

22372240
# Store the parent trace context for propagation to child tasks
22382241
if event.executionStarted.HasField("parentTraceContext"):

0 commit comments

Comments
 (0)