diff --git a/aurweb/routers/accounts.py b/aurweb/routers/accounts.py index 86dd993e..6472ccae 100644 --- a/aurweb/routers/accounts.py +++ b/aurweb/routers/accounts.py @@ -529,7 +529,6 @@ async def accounts_post(request: Request, # Get a query handle to users, populate the total user # count into a jinja2 context variable. query = db.query(models.User).join(models.AccountType) - context["total_users"] = query.count() # Populate this list with any additional statements to # be ANDed together. @@ -551,8 +550,10 @@ async def accounts_post(request: Request, if statements: query = query.filter(and_(*statements)) + context["total_users"] = query.count() + # Finally, order and truncate our users for the current page. - users = query.order_by(*order_by).limit(pp).offset(offset) + users = query.order_by(*order_by).limit(pp).offset(offset).all() context["users"] = util.apply_all(users, db.refresh) return render_template(request, "account/index.html", context) diff --git a/templates/partials/account/results.html b/templates/partials/account/results.html index ec2f269c..1c398ce1 100644 --- a/templates/partials/account/results.html +++ b/templates/partials/account/results.html @@ -64,11 +64,11 @@ {% for k, v in params.items() %} - + {% endfor %} +