diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2021-09-23 11:20:28 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2021-09-23 11:20:58 +0200 |
commit | c160f1284902a8e975a717bf391a94d0010e0ca6 (patch) | |
tree | 505bad721349e756bf475284021d9e781f16a677 | |
parent | use .count() instead of len(), add debug_toolbar (diff) | |
download | scout-subs-c160f1284902a8e975a717bf391a94d0010e0ca6.tar.gz scout-subs-c160f1284902a8e975a717bf391a94d0010e0ca6.zip |
fix ulist only of same group
Diffstat (limited to '')
-rw-r--r-- | server/views.py | 2 | ||||
-rw-r--r-- | version.txt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server/views.py b/server/views.py index 7d045bb..94e6e90 100644 --- a/server/views.py +++ b/server/views.py @@ -279,7 +279,7 @@ def ulist(request): # list users with their documents
permission = Permission.objects.get(codename="approved")
- usercodes = UserCode.objects.filter(Q(user__user_permissions=permission) | Q(user__is_staff=True)).select_related("user", "medic").order_by("user__last_name")
+ usercodes = UserCode.objects.filter(Q(user__user_permissions=permission) | Q(user__is_staff=True)).filter(user__groups__name__contains=parent_group).select_related("user", "medic").order_by("user__last_name")
vac_file = ["/server/media/", "/vac_certificate/usercode"]
health_file = ["/server/media/", "/health_care_certificate/usercode"]
diff --git a/version.txt b/version.txt index 5dafcc3..9a63e20 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ version=0.4 -rev=1 +rev=2 |