diff --git a/rowers/plannedsessions.py b/rowers/plannedsessions.py index cf3c36d3..5740f53a 100644 --- a/rowers/plannedsessions.py +++ b/rowers/plannedsessions.py @@ -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) diff --git a/rowers/templates/race_submit.html b/rowers/templates/race_submit.html index e8678c04..b51538b0 100644 --- a/rowers/templates/race_submit.html +++ b/rowers/templates/race_submit.html @@ -28,10 +28,7 @@ method="post">
-
Workouts
+Select one of the following workouts that you rowed within the race window