Skip to content

Commit

Permalink
Hotfix due to API issues
Browse files Browse the repository at this point in the history
Fixing API might take some time, so it's better to display user name as "No data" rather than throwing an error.
  • Loading branch information
Strogoo committed Mar 20, 2020
1 parent 8f7d126 commit 4035cab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/replays/replayitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ def generatePlayerHTML(self, i, player):
else:
alignment = "left"

if "login" not in player["player"]:
player["player"]["login"] = "No data"

playerLabel = self.FORMATTER_REPLAY_PLAYER_LABEL.format(player_name=player["player"]["login"],
player_rating= int(round((player["beforeMean"] - player["beforeDeviation"] * 3)/100) * 100),
alignment=alignment)
Expand Down

0 comments on commit 4035cab

Please sign in to comment.