Private
Public Access
1
0

fix gender bug

This commit is contained in:
Sander Roosendaal
2020-06-21 18:05:04 +02:00
parent c0ad02d29c
commit 14bc64b3db

View File

@@ -1372,8 +1372,9 @@ def default_class(r,w,race):
boatclass=boatclass, boatclass=boatclass,
adaptiveclass=adaptiveclass, adaptiveclass=adaptiveclass,
boattype=boattype, boattype=boattype,
weightclass=weightclass weightclass=weightclass,
).order_by("agemax","-agemin","boattype") sex=sex,
).order_by("agemax","-agemin","boattype","sex")
if standards.count()==0: if standards.count()==0:
@@ -1382,12 +1383,12 @@ def default_class(r,w,race):
boatclass=boatclass, boatclass=boatclass,
adaptiveclass=adaptiveclass, adaptiveclass=adaptiveclass,
boattype=boattype, boattype=boattype,
) ).order_by("agemax","-agemin","boattype","sex")
if standards.count()==0: if standards.count()==0:
standards = CourseStandard.objects.filter(agemin__lt=age,agemax__gt=age, standards = CourseStandard.objects.filter(agemin__lt=age,agemax__gt=age,
boattype=boattype) boattype=boattype).order_by("agemax","-agemin","boattype","sex")
if standards.count()==0: if standards.count()==0:
standards = CourseStandard.objects.filter(agemin__lt=age,agemax__gt=age) standards = CourseStandard.objects.filter(agemin__lt=age,agemax__gt=age).order_by("agemax","-agemin","boattype","sex")
if standards.count()==0: if standards.count()==0:
# boolean, boattype, boatclass, adaptiveclass, weightclass, sex, coursestandard, # boolean, boattype, boatclass, adaptiveclass, weightclass, sex, coursestandard,