Skip to content
Permalink
Browse files

fixed leaderboard

  • Loading branch information...
YogurtTheHorse committed Sep 18, 2016
1 parent 66bf2d7 commit 4449aefd02bf915130f71280158969d6c77675de
Showing with 1 addition and 3 deletions.
  1. +1 −3 databasemanager/leaderboard_model.py
@@ -24,7 +24,7 @@ def get_model(db):

@Scores.class_method
def get_leaderboard(cls, leaderboard, count=10):
if leaderboard_name == 'death':
if leaderboard == 'death':
res = list(cls.find({"leaderboard": 'rooms'}))

for r in res:
@@ -36,8 +36,6 @@ def get_leaderboard(cls, leaderboard, count=10):
def sort_by_score(doc):
return doc['score']

table = db.table(leaderboard_name)

res = list(cls.find({"leaderboard": leaderboard}))
res.sort(key=sort_by_score, reverse=True)

0 comments on commit 4449aef

Please sign in to comment.
You can’t perform that action at this time.