示例#1
0
 def get_inactive_players(self) -> List[Player]:
     """Return formatted inactive player data.
     """
     inst = JSONDecoder()
     inactive_player = [
         Player.objects.get(pk=pk)
         for pk in inst.decode(self.inactive_players)
         if Player.objects.filter(pk=pk).count() > 0
     ]
     return inactive_player
示例#2
0
 def get_dnp_players(self) -> Dict[Player, str]:
     """Return formatted DNP player data.
     """
     inst = JSONDecoder()
     dnp_players = {
         Player.objects.get(pk=pk): reason
         for pk, reason in inst.decode(self.dnp_players).items()
         if Player.objects.filter(pk=pk).count() > 0
     }
     return dnp_players