implement auto filter for min games played

This commit is contained in:
Yannik Schmidt
2020-09-28 05:04:50 +02:00
parent a91fd79859
commit b435226413
3 changed files with 13 additions and 4 deletions

View File

@@ -102,6 +102,8 @@ def leaderboard():
if playerName:
playerInLeaderboard = db.findPlayerByName(playerName)
if(playerInLeaderboard.games < 10):
return flask.redirect("/player?id={}".format(playerInLeaderboard.playerId))
rank = playerInLeaderboard.rank
if not playerInLeaderboard:
cannotFindPlayer = flask.Markup("<div class=noPlayerFound>No player of that name</div>")