From 0f020d77586dccbdf8304e2026430461e85a37d8 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 21 Sep 2023 00:18:32 +0700 Subject: [PATCH] Optimize group list (#8554) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Дмитрий Муковкин --- dojo/group/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dojo/group/views.py b/dojo/group/views.py index 9cce9351268..1219c40b202 100644 --- a/dojo/group/views.py +++ b/dojo/group/views.py @@ -27,7 +27,7 @@ @user_is_configuration_authorized('auth.view_group') def group(request): - groups = get_authorized_groups(Permissions.Group_View) + groups = get_authorized_groups(Permissions.Group_View).prefetch_related('users', 'global_role', 'global_role__role') groups = GroupFilter(request.GET, queryset=groups) paged_groups = get_page_items(request, groups.qs, 25) add_breadcrumb(title="All Groups", top_level=True, request=request)