From b7717e71de8796e4cbd43ae011abd7c2ed6b2870 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Mon, 30 May 2022 19:43:47 +0200 Subject: doclist group filter work as expected --- server/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server') diff --git a/server/views.py b/server/views.py index d471e65..988b6b2 100644 --- a/server/views.py +++ b/server/views.py @@ -998,7 +998,7 @@ def doclist(request): if len(groups) > 0: if groups[0] != "": - q_obj &= Q(group__name__in=groups) + q_obj &= Q(user__groups__name__in=groups) chips_groups += groups # run query @@ -1023,7 +1023,7 @@ def doclist(request): "sign_doc_file": sign_doc_file, "types": auto_types, "users": users, - "groups": parent_groups, + "groups": Group.objects.all(), "docs": documents, "hidden_check": hidden_check, "wait_check": wait_check, @@ -1225,7 +1225,7 @@ def doclist_readonly(request): if len(groups) > 0: if groups[0] != "": - q_obj &= Q(group__name__in=groups) + q_obj &= Q(user__groups__name__in=groups) chips_groups += groups # run query @@ -1247,7 +1247,7 @@ def doclist_readonly(request): "sign_doc_file": sign_doc_file, "types": auto_types, "users": users, - "groups": groups_view, + "groups": Group.objects.all(), "docs": documents, "hidden_check": hidden_check, "wait_check": wait_check, -- cgit v1.2.1