Private
Public Access
1
0

Merge branch 'release/v11.96'

This commit is contained in:
Sander Roosendaal
2020-03-21 09:33:18 +01:00
2 changed files with 27 additions and 23 deletions

View File

@@ -266,7 +266,7 @@
<tr> <tr>
<td>{{ forloop.counter }}</td> <td>{{ forloop.counter }}</td>
<td> <td>
<a href="/rowers/workout/{{ result.workoutid }}"> <a href="/rowers/workout/{{ result.workoutid|encode }}">
{{ result.username }}</a></td> {{ result.username }}</a></td>
<td>{{ result.teamname }}</td> <td>{{ result.teamname }}</td>
<td>{{ result.age }}</td> <td>{{ result.age }}</td>
@@ -286,7 +286,7 @@
<td>{{ result.duration |durationprint:"%H:%M:%S.%f" }}</td> <td>{{ result.duration |durationprint:"%H:%M:%S.%f" }}</td>
<td>{{ result.distance }} m</td> <td>{{ result.distance }} m</td>
<td> <td>
<a href="/rowers/workout/{{ result.workoutid }}"> <a href="/rowers/workout/{{ result.workoutid|encode }}">
Details</a></td> Details</a></td>
<td> <td>
{% if race.manager == request.user and not race|is_final %} {% if race.manager == request.user and not race|is_final %}

View File

@@ -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") 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: if result:
otherrecords = resultobj.objects.filter( otherrecords = resultobj.objects.filter(race = race).exclude(userid = r.id)
race = race).exclude(userid = r.id)
if not jobid: if not jobid:
messages.info(request,"Result submitted successfully.") messages.info(request,"Result submitted successfully.")
for otherrecord in otherrecords: for otherrecord in otherrecords:
otheruser = Rower.objects.get(id=otherrecord.userid) try:
othername = otheruser.user.first_name+' '+otheruser.user.last_name otheruser = Rower.objects.get(id=otherrecord.userid)
registeredname = r.user.first_name+' '+r.user.last_name othername = otheruser.user.first_name+' '+otheruser.user.last_name
if otherrecord.emailnotifications: registeredname = r.user.first_name+' '+r.user.last_name
job = myqueue( if otherrecord.emailnotifications:
queue, job = myqueue(
handle_sendemail_racesubmission, queue,
otheruser.user.email, othername, handle_sendemail_racesubmission,
registeredname, otheruser.user.email, othername,
race.name, registeredname,
race.id race.name,
) race.id
)
except Rower.DoesNotExist:
pass
# redirect to race page # redirect to race page