mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-21 22:58:05 +00:00
🐛 Fix the IntegrityError
caused by not executing the update command when updating player_info
data
This commit is contained in:
parent
d429553488
commit
064a4083c5
@ -121,7 +121,7 @@ class PlayerInfoService(BaseService):
|
|||||||
player_info_enka = await self.get_player_info_from_enka(player.player_id)
|
player_info_enka = await self.get_player_info_from_enka(player.player_id)
|
||||||
if player_info_enka is None:
|
if player_info_enka is None:
|
||||||
player_info.last_save_time = datetime.now()
|
player_info.last_save_time = datetime.now()
|
||||||
await self._players_info_repository.update(PlayerInfoSQLModel.from_orm(player_info))
|
await self._players_info_repository.update(player_info)
|
||||||
await self.set_form_cache(player_info)
|
await self.set_form_cache(player_info)
|
||||||
return player_info
|
return player_info
|
||||||
player_info.nickname = player_info_enka.nickname
|
player_info.nickname = player_info_enka.nickname
|
||||||
@ -130,7 +130,7 @@ class PlayerInfoService(BaseService):
|
|||||||
player_info.hand_image = player_info_enka.avatar.id
|
player_info.hand_image = player_info_enka.avatar.id
|
||||||
player_info.nickname = player_info_enka.nickname
|
player_info.nickname = player_info_enka.nickname
|
||||||
player_info.last_save_time = datetime.now()
|
player_info.last_save_time = datetime.now()
|
||||||
await self._players_info_repository.update(PlayerInfoSQLModel.from_orm(player_info))
|
await self._players_info_repository.update(player_info)
|
||||||
await self.set_form_cache(player_info)
|
await self.set_form_cache(player_info)
|
||||||
return player_info
|
return player_info
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user