Private
Public Access
1
0

Merge branch 'release/v13.01'

This commit is contained in:
Sander Roosendaal
2020-06-21 18:19:44 +02:00

View File

@@ -1379,16 +1379,28 @@ def default_class(r,w,race):
if standards.count()==0:
# omit weight
standards = CourseStandard.objects.filter(agemin__lt=age,agemax__gt=age,
boatclass=boatclass,
adaptiveclass=adaptiveclass,
boattype=boattype,
).order_by("agemax","-agemin","boattype","sex")
standards = CourseStandard.objects.filter(
agemin__lt=age,agemax__gt=age,
boatclass=boatclass,
adaptiveclass=adaptiveclass,
boattype=boattype,
).order_by(
"agemax","-agemin","boattype","sex","weightcategory",
"referencespeed"
)
if standards.count()==0:
standards = CourseStandard.objects.filter(agemin__lt=age,agemax__gt=age,
boattype=boattype).order_by("agemax","-agemin","boattype","sex")
standards = CourseStandard.objects.filter(
agemin__lt=age,agemax__gt=age,
boattype=boattype
).order_by(
"agemax","-agemin","boattype","sex",
"weightcategory","referencespeed")
if standards.count()==0:
standards = CourseStandard.objects.filter(agemin__lt=age,agemax__gt=age).order_by("agemax","-agemin","boattype","sex")
standards = CourseStandard.objects.filter(
agemin__lt=age,agemax__gt=age
).order_by(
"agemax","-agemin","boattype","sex",
"weightcategory","referencespeed")
if standards.count()==0:
# boolean, boattype, boatclass, adaptiveclass, weightclass, sex, coursestandard,