Private
Public Access
1
0

added mixed as category

This commit is contained in:
Sander Roosendaal
2018-06-01 20:11:16 +02:00
parent 6b713cb91f
commit 0a259d51e1
4 changed files with 35 additions and 2 deletions

View File

@@ -13558,9 +13558,19 @@ def virtualevent_addboat_view(request,id=0):
boattype = cd['boattype']
weightcategory = cd['weightcategory']
age = cd['age']
mix = cd['mix']
sex = r.sex
if mix:
sex = 'mixed'
if boattype == '1x' and r.birthdate:
age = calculate_age(r.birthdate)
sex = r.sex
if sex == 'not specified':
sex = 'male'
if boattype in boattypes:
messages.error(request,"You have already registered in that boat type")
url = reverse(virtualevent_view,
@@ -13583,7 +13593,7 @@ def virtualevent_addboat_view(request,id=0):
duration=datetime.time(0,0),
boattype=boattype,
coursecompleted=False,
sex=r.sex,
sex=sex,
age=age
)
@@ -13649,8 +13659,18 @@ def virtualevent_register_view(request,id=0):
boattype = cd['boattype']
weightcategory = cd['weightcategory']
age = cd['age']
mix = cd['mix']
sex = r.sex
if mix:
sex = 'mixed'
if boattype == '1x' and r.birthdate:
age = calculate_age(r.birthdate)
sex = r.sex
if sex == 'not specified':
sex = 'male'
record = VirtualRaceResult(
userid=r.id,
@@ -13664,7 +13684,7 @@ def virtualevent_register_view(request,id=0):
duration=datetime.time(0,0),
boattype=boattype,
coursecompleted=False,
sex=r.sex,
sex=sex,
age=age
)