From efb572f15bbe8a7ce59088537bbed08f86824f4f Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Wed, 18 Sep 2024 13:18:37 -0700 Subject: [PATCH] Add missing branch --- libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/__init__.py | 2 ++ libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/aio.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/__init__.py b/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/__init__.py index 215c84206..25d823c86 100644 --- a/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/__init__.py +++ b/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/__init__.py @@ -510,6 +510,8 @@ def get_next_version(self, current: Optional[str], channel: ChannelProtocol) -> """ if current is None: current_v = 0 + elif isinstance(current, int): + current_v = current else: current_v = int(current.split(".")[0]) next_v = current_v + 1 diff --git a/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/aio.py b/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/aio.py index 0e3ab0ecb..73bc3ef02 100644 --- a/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/aio.py +++ b/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/aio.py @@ -515,6 +515,8 @@ def get_next_version(self, current: Optional[str], channel: ChannelProtocol) -> """ if current is None: current_v = 0 + elif isinstance(current, int): + current_v = current else: current_v = int(current.split(".")[0]) next_v = current_v + 1