bg fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user