fixes
This commit is contained in:
@@ -3277,6 +3277,7 @@ def virtualevent_entry_edit_view(request,id=0,entryid=0):
|
||||
if form.is_valid():
|
||||
cd = form.cleaned_data
|
||||
|
||||
|
||||
teamname = cd['teamname']
|
||||
try:
|
||||
boattype = cd['boattype']
|
||||
@@ -3293,12 +3294,12 @@ def virtualevent_entry_edit_view(request,id=0,entryid=0):
|
||||
acceptsocialmedia = cd['acceptsocialmedia']
|
||||
|
||||
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'
|
||||
@@ -3328,6 +3329,7 @@ def virtualevent_entry_edit_view(request,id=0,entryid=0):
|
||||
messages.error(request,'You are older than the maximum age for this group')
|
||||
return HttpResponseRedirect(returnurl)
|
||||
|
||||
print(sex,coursestandard.sex)
|
||||
if sex == 'male' and coursestandard.sex != 'male':
|
||||
messages.error(request,'Men are not allowed to enter this category')
|
||||
return HttpResponseRedirect(returnurl)
|
||||
|
||||
Reference in New Issue
Block a user