From c5d3e6a9c18e8461e8c9410234f718277c8319d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Wed, 15 Mar 2023 12:21:53 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Refresh=20Objects=20Explicitly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/services/players/repositories.py | 1 + 1 file changed, 1 insertion(+) diff --git a/core/services/players/repositories.py b/core/services/players/repositories.py index 91f68743..0bf4daa0 100644 --- a/core/services/players/repositories.py +++ b/core/services/players/repositories.py @@ -41,6 +41,7 @@ class PlayersRepository(BaseService.Component): async with AsyncSession(self.engine) as session: session.add(player) await session.commit() + await session.refresh(player) async def delete(self, player: Player) -> None: async with AsyncSession(self.engine) as session: