pokken: add additional logging

This commit is contained in:
Hay1tsme 2024-06-11 14:00:29 -04:00
parent fe4d978f70
commit eaab3728c4

View File

@ -184,15 +184,14 @@ class PokkenBase:
if profile is None or profile['trainer_name'] is None: if profile is None or profile['trainer_name'] is None:
profile_id = await self.data.profile.create_profile(user_id) profile_id = await self.data.profile.create_profile(user_id)
self.logger.info(f"Create new profile {profile_id} for user {user_id}")
profile_dict = {"id": profile_id, "user": user_id} profile_dict = {"id": profile_id, "user": user_id}
pokemon_data = [] pokemon_data = []
load_usr.new_card_flag = True load_usr.new_card_flag = True
else: else:
profile_dict = {k: v for k, v in profile._asdict().items() if v is not None} profile_dict = {k: v for k, v in profile._asdict().items() if v is not None}
self.logger.info( self.logger.info(f"Card-in user {user_id} (Trainer name {profile_dict.get('trainer_name', '')})")
f"Card-in user {user_id} (Trainer name {profile_dict.get('trainer_name', '')})"
)
pokemon_data = await self.data.profile.get_all_pokemon_data(user_id) pokemon_data = await self.data.profile.get_all_pokemon_data(user_id)
load_usr.new_card_flag = False load_usr.new_card_flag = False