diff options
author | Andrea Lepori <aleporia@gmail.com> | 2023-07-27 16:16:25 +0200 |
---|---|---|
committer | Andrea Lepori <aleporia@gmail.com> | 2023-07-27 16:16:26 +0200 |
commit | 02667f162ecaa344c0fbee54fe0ef11bdee9cb2a (patch) | |
tree | 45a52f3928ffa2315dd4f2462df9e3901797300b /client/views.py | |
parent | verify attachments upload (diff) | |
download | scout-subs-02667f162ecaa344c0fbee54fe0ef11bdee9cb2a.tar.gz scout-subs-02667f162ecaa344c0fbee54fe0ef11bdee9cb2a.zip |
new uc fix document lists
Diffstat (limited to 'client/views.py')
-rw-r--r-- | client/views.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 |