refactor: Refactor serialize_player function to handle empty player.personaname
This commit is contained in:
parent
54a32028e2
commit
2185d955ad
@ -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