bug fix points score
This commit is contained in:
@@ -9,6 +9,7 @@ from rowers.scoring import *
|
||||
|
||||
from django.contrib.gis.geoip2 import GeoIP2
|
||||
from django import forms
|
||||
from rowers.plannedsessions import timefield_to_seconds_duration
|
||||
|
||||
# distance of course from lat_lon in km
|
||||
def howfaris(lat_lon,course):
|
||||
@@ -3500,7 +3501,14 @@ def virtualevent_entry_edit_view(request,id=0,entryid=0):
|
||||
return HttpResponseRedirect(returnurl)
|
||||
|
||||
if record.points != 0:
|
||||
record.points = record.points*record.referencespeed/referencespeed
|
||||
if race.sessiontype == 'race':
|
||||
coursedistance = race.course.distance
|
||||
else:
|
||||
coursedistance = record.distance
|
||||
v = coursedistance/timefield_to_seconds_duration(record.duration)
|
||||
points = 100.*(2-(referencespeed/v))
|
||||
record.points = points
|
||||
|
||||
|
||||
record.teamname = teamname
|
||||
record.weightcategory=weightcategory
|
||||
|
||||
Reference in New Issue
Block a user