tested functionality on test site
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user