Private
Public Access
1
0

tested functionality on test site

This commit is contained in:
Sander Roosendaal
2019-01-24 21:01:05 +01:00
parent 29e097359e
commit 2ec4419597
4 changed files with 13 additions and 9 deletions

View File

@@ -36,6 +36,9 @@ import courses
import iso8601
from iso8601 import ParseError
from rowers.tasks import handle_check_race_course
from rowers.tasks import (
handle_sendemail_raceregistration,handle_sendemail_racesubmission
)
from rowers.utils import totaltime_sec_to_string
def get_indoorraces(workout):
@@ -891,6 +894,7 @@ def email_submit_race(r,race,workoutid):
w.duration = totaltime_sec_to_string(60.*race.sessionvalue)
w.save()
elif race.sessionmode == 'distance':
delta = w.distance - race.sessionvalue
@@ -938,6 +942,7 @@ def email_submit_race(r,race,workoutid):
otherrecords = IndoorVirtualRaceResult.objects.filter(
race = race).exclude(userid = r.id)
for otherrecord in otherrecords:
otheruser = Rower.objects.get(id=otherrecord.userid)
othername = otheruser.user.first_name+' '+otheruser.user.last_name
@@ -960,7 +965,6 @@ def email_submit_race(r,race,workoutid):
)
if not records:
print 'jet'
return 0
record = records[0]
@@ -971,7 +975,7 @@ def email_submit_race(r,race,workoutid):
workouts,race,r,recordid=record.id
)
if result:
otherrecords = IndoorVirtualRaceResult.objects.filter(
race = race).exclude(userid = r.id)