added mixed as category
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user