refactor: Refactor serialize_player function to handle empty player.personaname
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
59b4ed7f03
commit
adc6aaf815
@ -3,7 +3,7 @@ import dota
|
||||
def serialize_player(player):
|
||||
friend = dota.Friend.get_or_none(steam_id=player.account_id)
|
||||
player_data = {
|
||||
'personaname': player.personaname,
|
||||
'personaname': player.personaname if player.personaname else '',
|
||||
'nickname': friend.name if friend else '',
|
||||
'kills': player.kills,
|
||||
'deaths': player.deaths,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user