Private
Public Access
1
0

Merge branch 'hotfix/ignoreworkouttype' into develop

This commit is contained in:
Sander Roosendaal
2020-08-28 21:30:55 +02:00

View File

@@ -1501,11 +1501,6 @@ def add_workout_indoorrace(ws,race,r,recordid=0,doregister=False):
)
if race.sessionmode == 'distance':
if ws[0].distance != race.sessionvalue:
errors.append('Your workout did not have the correct distance')
@@ -1659,13 +1654,15 @@ def add_workout_race(ws,race,r,splitsecond=0,recordid=0,doregister=False):
errors.append("Couldn't find this entry")
return result,comments,errors,0
if ws[0].workouttype not in mytypes.otwtypes:
errors.append('You have to submit a rowing on water workout')
return 0,comments,errors,0
#if ws[0].workouttype not in mytypes.otwtypes:
# errors.append('You have to submit a rowing on water workout')
# return 0,comments,errors,0
if ws[0].workouttype != record.boatclass:
errors.append('Your workout boat class is different than on your race registration')
return 0,comments,errors,0
ws[0].workouttype = record.boatclass
ws[0].save()
#errors.append('Your workout boat class is different than on your race registration')
#return 0,comments,errors,0
if ws[0].boattype != record.boattype:
errors.append('Your workout boat type did not match the boat type you registered')