diff --git a/rowers/templates/virtualevent.html b/rowers/templates/virtualevent.html index 60d40f64..b67e93d0 100644 --- a/rowers/templates/virtualevent.html +++ b/rowers/templates/virtualevent.html @@ -31,7 +31,7 @@ {% block main %} - +

{{ race.name }}

@@ -77,7 +77,7 @@

{{ coursediv|safe }} - + {{ coursescript|safe }}
@@ -181,7 +181,7 @@ Upload a new workout to the site and submit it as a result. You - need a workout data file. + need a workout data file. {% if race.sessiontype == 'indoorrace' %} @@ -266,7 +266,7 @@ {{ forloop.counter }} - + {{ result.username }} {{ result.teamname }} {{ result.age }} @@ -286,7 +286,7 @@ {{ result.duration |durationprint:"%H:%M:%S.%f" }} {{ result.distance }} m - + Details {% if race.manager == request.user and not race|is_final %} @@ -413,7 +413,7 @@ {% else %} Subscribe to race notifications by email - + {% endif %} {% else %} {% if record.emailnotifications %} @@ -423,7 +423,7 @@ {% else %} Subscribe to race notifications by email - + {% endif %} {% endif %} {% endif %} @@ -479,7 +479,7 @@

The results table has a link to a page where details of your workout - are shown. + are shown.

Race results are stored permanently and are not deleted when @@ -507,7 +507,7 @@

Until the evaluation closure time, the race organizer can review and reject entries. If you are disqualified in this - way, you will receive an email with the reason. + way, you will receive an email with the reason.

diff --git a/rowers/views/racesviews.py b/rowers/views/racesviews.py index e9c7e3cf..15ea49d4 100644 --- a/rowers/views/racesviews.py +++ b/rowers/views/racesviews.py @@ -2155,24 +2155,28 @@ def virtualevent_submit_result_view(request,id=0,workoutid=0): messages.info(request,"We are evaluating your result. The page will reload when we're done. Your result will show up if you adhered to the course") if result: - otherrecords = resultobj.objects.filter( - race = race).exclude(userid = r.id) + otherrecords = resultobj.objects.filter(race = race).exclude(userid = r.id) if not jobid: messages.info(request,"Result submitted successfully.") for otherrecord in otherrecords: - otheruser = Rower.objects.get(id=otherrecord.userid) - othername = otheruser.user.first_name+' '+otheruser.user.last_name - registeredname = r.user.first_name+' '+r.user.last_name - if otherrecord.emailnotifications: - job = myqueue( - queue, - handle_sendemail_racesubmission, - otheruser.user.email, othername, - registeredname, - race.name, - race.id - ) + try: + otheruser = Rower.objects.get(id=otherrecord.userid) + othername = otheruser.user.first_name+' '+otheruser.user.last_name + registeredname = r.user.first_name+' '+r.user.last_name + if otherrecord.emailnotifications: + job = myqueue( + queue, + handle_sendemail_racesubmission, + otheruser.user.email, othername, + registeredname, + race.name, + race.id + ) + except Rower.DoesNotExist: + pass + + # redirect to race page