aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/views.py
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-08-29 18:24:24 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-08-29 18:24:24 +0200
commit0b04c2f6796e4f0bd29b4f2e21d44f0453b4453a (patch)
tree418924df2d8c10698a251b53d9fda2dc86ea18e7 /accounts/views.py
parentbetter download html (diff)
downloadscout-subs-0b04c2f6796e4f0bd29b4f2e21d44f0453b4453a.tar.gz
scout-subs-0b04c2f6796e4f0bd29b4f2e21d44f0453b4453a.zip
school year format, fix overlapping text in docs
Diffstat (limited to 'accounts/views.py')
-rw-r--r--accounts/views.py7
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"]