@@ -168,11 +168,11 @@ async def war_result(self, clan_tag: str, preparation_start: int = 0) -> Optiona
168168 f"/war_result?clan_tag={ correct_tag (clan_tag , '%23' )} "
169169 f"&prep_start={ str (preparation_start )} " )
170170 try :
171- return ClanWar (data = data ["response" ], client = self .coc_client )
171+ return ClanWar (data = data ["response" ], client = self .coc_client , clan_tag = coc . utils . correct_tag ( clan_tag ) )
172172 except (IndexError , KeyError , TypeError , ValueError ):
173173 return None
174174
175- async def war_result_log (self , clan_tag : str ) -> Optional [Generator [ClanWar ]]:
175+ async def war_result_log (self , clan_tag : str ) -> Optional [Generator [ClanWar , None , None ]]:
176176 """Get all stored war results for a clan.
177177
178178 Parameters
@@ -189,9 +189,8 @@ async def war_result_log(self, clan_tag: str) -> Optional[Generator[ClanWar]]:
189189 f"/war_result_log?clan_tag={ correct_tag (clan_tag , '%23' )} " )
190190 try :
191191 responses = data ["log" ]
192-
193- generator = (ClanWar (data = response ["response" ], client = self .coc_client ) for response in responses )
194- return generator
192+ return (ClanWar (data = response ["response" ], client = self .coc_client ,
193+ clan_tag = coc .utils .correct_tag (clan_tag )) for response in responses )
195194 except (IndexError , KeyError , TypeError , ValueError ):
196195 return None
197196
0 commit comments