diff --git a/files/routes/holes.py b/files/routes/holes.py index abc42235d..043f07962 100644 --- a/files/routes/holes.py +++ b/files/routes/holes.py @@ -736,9 +736,9 @@ def hole_marsey(v, hole): @limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID) @auth_required def subs(v): - subs = g.db.query(Hole, func.count(Post.hole)).outerjoin(Post, Hole.name == Post.hole).group_by(Hole.name).order_by(func.count(Post.hole).desc()).all() + holes = g.db.query(Hole, func.count(Post.hole)).outerjoin(Post, Hole.name == Post.hole).group_by(Hole.name).order_by(hole.created_utc).all() total_users = g.db.query(User).count() - return render_template('hole/holes.html', v=v, subs=subs, total_users=total_users) + return render_template('hole/holes.html', v=v, holes=holes, total_users=total_users) @app.post("/hole_pin/") @limiter.limit('1/second', scope=rpath) diff --git a/files/templates/hole/holes.html b/files/templates/hole/holes.html index 4c1cfacb7..95de6e885 100644 --- a/files/templates/hole/holes.html +++ b/files/templates/hole/holes.html @@ -15,7 +15,7 @@ - {% for hole, count in subs %} + {% for hole, count in holes %} {{loop.index}} {{hole}} {% if hole.name in v.hole_blocks %}[blocked, visit it to unblock it]{% endif %}