aboutsummaryrefslogtreecommitdiffstats
path: root/server/views.py
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2022-05-30 19:43:47 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2022-05-30 19:43:48 +0200
commitb7717e71de8796e4cbd43ae011abd7c2ed6b2870 (patch)
tree93d3035d8503fddb001be1003dc3a21666c0f84a /server/views.py
parentdisable debug for materialize fix (diff)
downloadscout-subs-b7717e71de8796e4cbd43ae011abd7c2ed6b2870.tar.gz
scout-subs-b7717e71de8796e4cbd43ae011abd7c2ed6b2870.zip
doclist group filter work as expected
Diffstat (limited to 'server/views.py')
-rw-r--r--server/views.py8
1 files changed, 4 insertions, 4 deletions
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,