From: Gord Thompson Date: Wed, 6 Sep 2023 15:33:27 +0000 (-0600) Subject: Fix async ORM example X-Git-Tag: rel_2_0_21~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aed8ac5985c37eb6b7ced996cc0329ca31e4748d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git 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 --- 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"