diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-08-29 18:24:24 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-08-29 18:24:24 +0200 |
commit | 0b04c2f6796e4f0bd29b4f2e21d44f0453b4453a (patch) | |
tree | 418924df2d8c10698a251b53d9fda2dc86ea18e7 /accounts/views.py | |
parent | better download html (diff) | |
download | scout-subs-0b04c2f6796e4f0bd29b4f2e21d44f0453b4453a.tar.gz scout-subs-0b04c2f6796e4f0bd29b4f2e21d44f0453b4453a.zip |
school year format, fix overlapping text in docs
Diffstat (limited to '')
-rw-r--r-- | accounts/views.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/accounts/views.py b/accounts/views.py index 696391d..230e3e1 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -114,7 +114,12 @@ def personal(request): usercode.home_phone = request.POST["home_phone"] usercode.phone = request.POST["phone"] usercode.school = request.POST["school"] - usercode.year = request.POST["year"] + if request.POST["year"].isdigit(): + usercode.year = request.POST["year"] + else: + error = True + error_text = "L'anno scolastico deve essere un numero" + usercode.save() medic.emer_name = request.POST["emer_name"] |