Removed user 0 from leaderbpard

master
Davide Bongiovanni 6 years ago
parent c2c3b2b4cb
commit 22f997b15c

@ -41,7 +41,7 @@ def connect(user, password, db, host='localhost', port=5432):
return con, meta
def getLeaderboard():
s = 'select u.username as name, u.score as score, max(m.meal_date) as last_meal from users as u left join meals as m on m.kuk = u.id group by u.id order by score, last_meal;'
s = 'select u.username as name, u.score as score, max(m.meal_date) as last_meal from users as u left join meals as m on m.kuk = u.id where u.id > 0 group by u.id order by score, last_meal;'
r = db_engine.execute(text(s))
leaders=[]
for row in r:

Loading…
Cancel
Save