mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-16 12:51:35 +00:00
🎨 Refresh Objects Explicitly
This commit is contained in:
parent
80dc9f4e2a
commit
c5d3e6a9c1
@ -41,6 +41,7 @@ class PlayersRepository(BaseService.Component):
|
|||||||
async with AsyncSession(self.engine) as session:
|
async with AsyncSession(self.engine) as session:
|
||||||
session.add(player)
|
session.add(player)
|
||||||
await session.commit()
|
await session.commit()
|
||||||
|
await session.refresh(player)
|
||||||
|
|
||||||
async def delete(self, player: Player) -> None:
|
async def delete(self, player: Player) -> None:
|
||||||
async with AsyncSession(self.engine) as session:
|
async with AsyncSession(self.engine) as session:
|
||||||
|
Loading…
Reference in New Issue
Block a user