From aed8ac5985c37eb6b7ced996cc0329ca31e4748d Mon Sep 17 00:00:00 2001 From: Gord Thompson Date: Wed, 6 Sep 2023 09:33:27 -0600 Subject: [PATCH] Fix async ORM example Reverting change from b3216486 that causes error sqlalchemy.exc.MultipleResultsFound: Multiple rows were found when exactly one was required Change-Id: I9b249ff6e8e336f9c224e670359b4df99bc06092 --- examples/asyncio/async_orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/asyncio/async_orm.py b/examples/asyncio/async_orm.py index eabc0250de..592323be42 100644 --- a/examples/asyncio/async_orm.py +++ b/examples/asyncio/async_orm.py @@ -96,7 +96,7 @@ async def async_main(): result = await session.scalars(select(A).order_by(A.id)) - a1 = result.one() + a1 = result.first() a1.data = "new data" -- 2.47.2