Skip to content

Commit

Permalink
Fix backwards compat old threads
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos committed Jan 29, 2024
1 parent 7b76dbc commit 0f047a7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/app/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ def get(self, config: RunnableConfig) -> Checkpoint | None:
value.pop("__pregel_version")
value.pop("__pregel_ts")
checkpoint = empty_checkpoint()
checkpoint["channel_values"] = value
for key in value:
if value.get("messages"):
checkpoint["channel_values"] = {"__root__": value["messages"][1]}
else:
checkpoint["channel_values"] = {}
for key in checkpoint["channel_values"]:
checkpoint["channel_versions"][key] = 1
return checkpoint
else:
Expand Down

0 comments on commit 0f047a7

Please sign in to comment.