mirror of
https://github.com/FAUSheppy/open-web-leaderboard.git
synced 2025-12-06 23:21:35 +01:00
handle case of player existing without historical data
This commit is contained in:
@@ -52,7 +52,10 @@ class DatabaseConnection:
|
|||||||
timestampDict.update({ "sigma" : r[SIGMA]})
|
timestampDict.update({ "sigma" : r[SIGMA]})
|
||||||
playerIdDict.update({ r[TIMESTAMP] : timestampDict })
|
playerIdDict.update({ r[TIMESTAMP] : timestampDict })
|
||||||
|
|
||||||
|
try:
|
||||||
retDict = { rows[0][PLAYER_ID] : playerIdDict }
|
retDict = { rows[0][PLAYER_ID] : playerIdDict }
|
||||||
|
except IndexError:
|
||||||
|
retDict = None
|
||||||
return retDict
|
return retDict
|
||||||
|
|
||||||
def getPlayerById(self, playerId):
|
def getPlayerById(self, playerId):
|
||||||
|
|||||||
Reference in New Issue
Block a user