Forgot cast
This commit is contained in:
parent
59924f8021
commit
e7b31efc1f
1 changed files with 1 additions and 0 deletions
|
@ -97,6 +97,7 @@ def fetch_top_n(num):
|
|||
cursor.execute('SELECT * FROM users ORDER BY score DESC')
|
||||
output = cursor.fetchall()
|
||||
|
||||
num = int(num)
|
||||
output = json.dumps([dict(row) for row in output][:num])
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
|
Reference in a new issue