diff --git a/dota.py b/dota.py index 8c4d5ed..cacfef2 100644 --- a/dota.py +++ b/dota.py @@ -66,6 +66,9 @@ class Match(BaseModel): 'party_size': self.party_size, 'match_id': self.match_id, } + if not self.party_size: + player_account_ids = [player.account_id for player in match_.players if player.account_id] + match_data['party_size'] = Friend.select().where(Friend.steam_id.in_(player_account_ids)).count() return match_data