Skip to content

Commit 0f395fb

Browse files
committed
fixing parents
1 parent 3804274 commit 0f395fb

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

state-manager/app/controller/executed_state.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@ async def executed_state(namespace_name: str, state_id: PydanticObjectId, body:
2626
if len(body.outputs) == 0:
2727
state.status = StateStatusEnum.EXECUTED
2828
state.outputs = {}
29-
state.parents = {**state.parents, state.identifier: state.id}
3029
await state.save()
3130

3231
background_tasks.add_task(create_next_state, state)
3332

3433
else:
3534
state.outputs = body.outputs[0]
3635
state.status = StateStatusEnum.EXECUTED
37-
state.parents = {**state.parents, state.identifier: state.id}
3836

3937
await state.save()
4038
background_tasks.add_task(create_next_state, state)
@@ -51,10 +49,7 @@ async def executed_state(namespace_name: str, state_id: PydanticObjectId, body:
5149
inputs=state.inputs,
5250
outputs=output,
5351
error=None,
54-
parents={
55-
**state.parents,
56-
state.identifier: state.id
57-
}
52+
parents=state.parents
5853
))
5954

6055
if len(new_states) > 0:

0 commit comments

Comments
 (0)