mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-25 09:37:30 +00:00
🐛 Fix instance PlayerInfoSQLModel
is not persisted
This commit is contained in:
parent
72154924be
commit
15f50253a3
@ -180,5 +180,5 @@ class PlayerInfoService(BaseService):
|
||||
async def add(self, player_info: PlayerInfo):
|
||||
await self._players_info_repository.add(PlayerInfoSQLModel.from_orm(player_info))
|
||||
|
||||
async def delete(self, player_info: PlayerInfo):
|
||||
await self._players_info_repository.delete(PlayerInfoSQLModel.from_orm(player_info))
|
||||
async def delete(self, player_info: PlayerInfoSQLModel):
|
||||
await self._players_info_repository.delete(player_info)
|
||||
|
@ -218,6 +218,8 @@ class PlayersManagesPlugin(Plugin):
|
||||
cookies = await self.cookies_service.get(player.user_id, player.account_id, player.region)
|
||||
if cookies:
|
||||
await self.cookies_service.delete(cookies)
|
||||
player_info = await self.player_info_service.get_form_sql(player)
|
||||
if player_info is not None:
|
||||
await self.player_info_service.delete(player_info)
|
||||
await callback_query.edit_message_text(
|
||||
f"成功删除 {player.player_id} ", reply_markup=InlineKeyboardMarkup(buttons)
|
||||
|
Loading…
Reference in New Issue
Block a user