From 527a887578646f188032b50b5329ea017f9efc7c Mon Sep 17 00:00:00 2001 From: Roman Right Date: Thu, 23 Jan 2025 17:25:55 -0600 Subject: [PATCH] Fix migration runner: use start_session without await --- beanie/migrations/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beanie/migrations/runner.py b/beanie/migrations/runner.py index b9ab8f06..b38ce842 100644 --- a/beanie/migrations/runner.py +++ b/beanie/migrations/runner.py @@ -164,7 +164,7 @@ async def run_migration_class( db = DBHandler.get_db() if client is None: raise RuntimeError("client must not be None") - async with await client.start_session() as s: + async with client.start_session() as s: if use_transaction: async with s.start_transaction(): await self.run_migrations(