diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2024-01-29 17:09:28 +0100 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2024-01-29 17:09:28 +0100 |
commit | 3734ff0bf3547a35769221035f8d6e54bf637b23 (patch) | |
tree | 35f47161749dc33820c155c5076180b747450089 /client | |
parent | add impersonate button (diff) | |
download | scout-subs-3734ff0bf3547a35769221035f8d6e54bf637b23.tar.gz scout-subs-3734ff0bf3547a35769221035f8d6e54bf637b23.zip |
fix show docs in ulist
Diffstat (limited to 'client')
-rw-r--r-- | client/templatetags/app_filter.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/templatetags/app_filter.py b/client/templatetags/app_filter.py index 335827e..9fbcff0 100644 --- a/client/templatetags/app_filter.py +++ b/client/templatetags/app_filter.py @@ -14,9 +14,8 @@ def doc_key_type(doc_type): return Keys.objects.filter(container=doc_type) @register.filter(name="user_docs") -def user_docs(admin_user, user): - parent_groups = admin_user.groups.values_list('name', flat=True) - documents = Document.objects.filter(Q(user=user) & ~Q(status='archive') & Q(document_type__group__name__in=parent_groups)) +def user_docs(usercode): + documents = Document.objects.filter(Q(usercode=usercode) & ~Q(status='archive')) return documents @register.filter(name="user_groups") |