From 3c4eccb13b7b261758fd6ef709d2a06ea0fb47df Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Wed, 13 Sep 2023 12:54:38 +0200 Subject: remove check for approved user --- client/views.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'client/views.py') diff --git a/client/views.py b/client/views.py index 236ae38..b470f8d 100644 --- a/client/views.py +++ b/client/views.py @@ -93,6 +93,7 @@ def index(request): # divide the docs for each uc all_invalid = True + no_docs = True docs = [] for uc in ucs: documents = Document.objects.filter( @@ -117,14 +118,17 @@ def index(request): invalid_flag = invalid_flag or no_attachment_flag all_invalid = all_invalid and invalid_flag docs.append([uc, documents, color, invalid_flag, no_attachment_flag, uc.branca == None]) + no_docs = no_docs and (len(documents) == 0) # show only docs of the user and non archived vac_file = ["/server/media/", "/vac_certificate/doc"] health_file = ["/server/media/", "/health_care_certificate/doc"] sign_doc_file = ["/server/media/", "/signed_doc/doc"] + print(docs) context = { "docs": docs, + "no_docs": no_docs, "all_invalid": all_invalid, "vac_file": vac_file, "health_file": health_file, -- cgit v1.2.1