Fixed order in sponsor/fursuit count pages
This commit is contained in:
parent
ee25571cd7
commit
866ac5b9d5
4
stats.py
4
stats.py
|
@ -7,7 +7,7 @@ bp = Blueprint("stats", url_prefix="/manage")
|
|||
@bp.route("/sponsorcount")
|
||||
async def sponsor_count(request, order: Order):
|
||||
await request.app.ctx.om.updateCache()
|
||||
orders = {key:value for key,value in sorted(request.app.ctx.om.cache.items(), key=lambda x: len(x[1].room_members), reverse=True) if value.status not in ['c', 'e']}
|
||||
orders = {key:value for key,value in sorted(request.app.ctx.om.cache.items(), key=lambda x: x[1].ans('fursona_name')) if value.status not in ['c', 'e']}
|
||||
|
||||
tpl = request.app.ctx.tpl.get_template('sponsorcount.html')
|
||||
return html(tpl.render(orders=orders, order=order))
|
||||
|
@ -23,7 +23,7 @@ async def nose_count(request, order: Order):
|
|||
@bp.route("/fursuitcount")
|
||||
async def fursuit_count(request, order: Order):
|
||||
await request.app.ctx.om.updateCache()
|
||||
orders = {key:value for key,value in sorted(request.app.ctx.om.cache.items(), key=lambda x: len(x[1].room_members), reverse=True) if value.status not in ['c', 'e']}
|
||||
orders = {key:value for key,value in sorted(request.app.ctx.om.cache.items(), key=lambda x: x[1].ans('fursona_name')) if value.status not in ['c', 'e']}
|
||||
|
||||
tpl = request.app.ctx.tpl.get_template('fursuitcount.html')
|
||||
return html(tpl.render(orders=orders, order=order))
|
Loading…
Reference in New Issue