diff options
| author | Declan Hoare <[email protected]> | 2020-04-17 18:46:12 +1000 |
|---|---|---|
| committer | Declan Hoare <[email protected]> | 2020-04-17 18:46:12 +1000 |
| commit | 9eb12a165b02aa0fc04bf48d710f5d005c25952f (patch) | |
| tree | bb04613ba443904e81ecf4a5dcd5d1fa318c018f /unite.py | |
| parent | 3d6f9adc382761441a82977f0aeef32b4118f935 (diff) | |
| download | shiftgears-master.tar.gz shiftgears-master.tar.bz2 shiftgears-master.zip | |
I had expected the client to sort it and allow the user to choose
ordering by level or codepoints, but it only displays the results
in the order they are sent.
Diffstat (limited to 'unite.py')
| -rw-r--r-- | unite.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -155,8 +155,8 @@ def get_display_name(uid, dbsession, authsession): def get_pong_highscores(dbsession, authsession): return flask.jsonify({"Pages": 0, # unused "Highscores": [mapping.map_to(user, mappings["PongHighscore"]) - for user in dbsession.query(User).all() - if user.PongLevel is not None and user.PongCP is not None]}) + for user in dbsession.query(User).filter(User.PongLevel.isnot(None)).filter(User.PongCP.isnot(None)) + .order_by(User.PongCP.desc()).all()]}) @api_route("/GetEmail") def get_email(dbsession, authsession): |
