diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2024-01-28 12:19:17 +0100 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2024-01-28 12:19:17 +0100 |
commit | cf4090543de0e4032b0c40046a52807124fdc6eb (patch) | |
tree | 6e77f90f6fc0c83176fefc8c528759dfb6de38c3 | |
parent | do not save usercodes without names (diff) | |
download | scout-subs-cf4090543de0e4032b0c40046a52807124fdc6eb.tar.gz scout-subs-cf4090543de0e4032b0c40046a52807124fdc6eb.zip |
fix missing date warning
Diffstat (limited to '')
-rw-r--r-- | accounts/views.py | 7 | ||||
-rw-r--r-- | version.txt | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/accounts/views.py b/accounts/views.py index bd1bbe1..c174fe8 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -571,18 +571,17 @@ def edit(request, code): missing_fields = False - if request.POST["birth_date"] == "" or request.POST["birth_date"].lower() == "01 gennaio 1970" or request.POST["birth_date"] == "None" or request.POST["birth_date"] == "Giovedì 01 Gennaio 1970 00:00": + if request.POST["birth_date"] == "" or request.POST["birth_date"].lower() == "01 gennaio 1970" or request.POST["birth_date"] == "None" or request.POST["birth_date"] == "Giovedì 01 Gennaio 1970 00:00" or request.POST["birth_date"] == "Giovedì 01 Gennaio 1970 01:00": validation_dic["birth_date"] = 'class="datepicker validate invalid" required="" aria-required="true"' missing_fields = True else: validation_dic["birth_date"] = 'class="datepicker validate" required="" aria-required="true"' - if request.POST["tetanus_date"] == "" or request.POST["tetanus_date"].lower() == "01 gennaio 1970" or request.POST["tetanus_date"] == "None" or request.POST["tetanus_date"] == "Giovedì 01 Gennaio 1970 00:00": + if request.POST["tetanus_date"] == "" or request.POST["tetanus_date"].lower() == "01 gennaio 1970" or request.POST["tetanus_date"] == "None" or request.POST["tetanus_date"] == "Giovedì 01 Gennaio 1970 00:00" or request.POST["tetanus_date"] == "Giovedì 01 Gennaio 1970 01:00": validation_dic["tetanus_date"] = 'class="datepicker validate invalid" required="" aria-required="true"' missing_fields = True else: validation_dic["tetanus_date"] = 'class="datepicker validate" required="" aria-required="true"' - print("not missing") for i in required_fields: if request.POST[i] == "": @@ -742,6 +741,8 @@ def edit(request, code): # show tooltip only if user is not approved and there are no errors home_tooltip = (len(errors) == 0) + print("date", usercode.born_date) + # fill context context = { 'ucode': code, diff --git a/version.txt b/version.txt index ceb0e0e..732342c 100644 --- a/version.txt +++ b/version.txt @@ -1,2 +1,2 @@ version=0.7 -rev=17 +rev=18 |