From 237add889c8e31ac058b81dbcce1b3aa963b48b9 Mon Sep 17 00:00:00 2001
From: Wes Appler <145372368+wes-otf@users.noreply.github.com>
Date: Sat, 14 Oct 2023 10:04:21 -0400
Subject: [PATCH] Fix wagtail user view pagination (#3613)

Closes #3607.

A quick one, just needed to have the variable changed from `page_obj` to
`users`, which is created and included in the context
[here](https://github.com/HyphaApp/hypha/blob/main/hypha/apply/users/admin_views.py#L167).
See screenshots below for a working example. Items per page was changed
from 20 to 5 to allow for demonstration. All other functionality works
as expected (ie. changing pages)
---
 hypha/apply/users/templates/wagtailusers/users/results.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hypha/apply/users/templates/wagtailusers/users/results.html b/hypha/apply/users/templates/wagtailusers/users/results.html
index 3b350343f..255e85b59 100644
--- a/hypha/apply/users/templates/wagtailusers/users/results.html
+++ b/hypha/apply/users/templates/wagtailusers/users/results.html
@@ -17,7 +17,7 @@
             {% include "wagtailusers/users/list.html" %}
 
             {# call pagination_nav with no linkurl, to generate general-purpose links like <a href="?p=2"> #}
-            {% include "wagtailadmin/shared/pagination_nav.html" with items=page_obj %}
+            {% include "wagtailadmin/shared/pagination_nav.html" with items=users %}
         {% else %}
             {% if is_searching %}
                 <h2 role="alert">{% blocktrans trimmed %}Sorry, no users match "<em>{{ query_string }}</em>"{% endblocktrans %}</h2>
-- 
GitLab