Skip to content

Commit

Permalink
checkpoint-postgres: fix setup for AsyncPostgresSaver (#1294)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbarda committed Aug 9, 2024
1 parent c303ef2 commit 6595869
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ async def setup(self) -> None:
async with self.lock:
async with self.conn.cursor(binary=True) as cur:
try:
version = (
await cur.execute(
"SELECT v FROM checkpoint_migrations ORDER BY v DESC LIMIT 1"
)
).fetchone()["v"]
results = await cur.execute(
"SELECT v FROM checkpoint_migrations ORDER BY v DESC LIMIT 1"
)
version = (await results.fetchone())["v"]
except UndefinedTable:
version = -1
for v, migration in zip(
Expand Down

0 comments on commit 6595869

Please sign in to comment.