From 02667f162ecaa344c0fbee54fe0ef11bdee9cb2a Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Thu, 27 Jul 2023 16:16:25 +0200 Subject: new uc fix document lists --- client/views.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'client/views.py') diff --git a/client/views.py b/client/views.py index 01cb43e..f3124a8 100644 --- a/client/views.py +++ b/client/views.py @@ -92,6 +92,7 @@ def index(request): return edit_wrapper(request, context) # divide the docs for each uc + all_invalid = True docs = [] for uc in ucs: documents = Document.objects.filter( @@ -114,6 +115,7 @@ def index(request): invalid_flag = ("" in data) or (None in data) or (dt.date(1970, 1, 1) in data) no_attachment_flag = (not uc.medic.vac_certificate) or (not uc.medic.health_care_certificate) 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]) # show only docs of the user and non archived @@ -123,6 +125,7 @@ def index(request): context = { "docs": docs, + "all_invalid": all_invalid, "vac_file": vac_file, "health_file": health_file, "sign_doc_file": sign_doc_file -- cgit v1.2.1