Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2018-04-19 15:37:54 +02:00
parent 116b407bbd
commit a7d6d82990
3 changed files with 14 additions and 18 deletions

View File

@@ -646,8 +646,7 @@ def add_workout_race(ws,race,r):
wold = Workout.objects.filter(plannedsession=race,user=r)
ids = [w.id for w in wold] + [w.id for w in ws]
ids = [w.id for w in ws]
ids = list(set(ids))
if len(ids)>1 and race.sessiontype in ['test','coursetest']:
@@ -664,6 +663,7 @@ def add_workout_race(ws,race,r):
comments.append('Your result has been submitted')
else:
errors.append('Workout %i did not match the race window' % w.id)
return result,comments,errors
if result>0:
username = r.user.first_name+' '+r.user.last_name
@@ -678,6 +678,7 @@ def add_workout_race(ws,race,r):
) = courses.get_time_course(ws,race.course)
if not coursecompleted:
errors.append('Your trajectory did not match the race course')
return result,comments,errors
duration = totaltime_sec_to_string(coursetime)