Private
Public Access
1
0

better OTW uploading and submitting

This commit is contained in:
Sander Roosendaal
2020-05-23 15:38:06 +02:00
parent e44f6b3ef7
commit 248276ddcf
4 changed files with 53 additions and 21 deletions

View File

@@ -1472,7 +1472,7 @@ def add_workout_race(ws,race,r,splitsecond=0,recordid=0):
errors.append('For tests and training sessions, selected workouts must all be done on the same date')
return result,comments,errors,0
if ws.count()>1 and race.sessiontype == 'test':
if len(ws)>1 and race.sessiontype == 'test':
errors.append('For tests, you can only attach one workout')
return result,comments,errors,0
@@ -1553,6 +1553,8 @@ def add_workout_race(ws,race,r,splitsecond=0,recordid=0):
job = myqueue(queue,handle_check_race_course,ws[0].csvfilename,
ws[0].id,race.course.id,record.id,splitsecond=splitsecond)
add_workouts_plannedsession(ws,race,r)