Merge branch 'hotfix/v15.44' into develop
This commit is contained in:
@@ -638,7 +638,11 @@ def cpdata(workouts, options):
|
||||
minutes = options['piece']
|
||||
if minutes != 0:
|
||||
# minutes = 77
|
||||
hourvalue,tvalue = divmod(minutes,60)
|
||||
try:
|
||||
hourvalue,tvalue = divmod(minutes,60)
|
||||
else:
|
||||
hourvalue = 0
|
||||
tvalue = minutes
|
||||
# hourvalue = 1, tvalue = 17
|
||||
hourvalue = int(hourvalue)
|
||||
minutevalue = int(tvalue)
|
||||
@@ -2426,6 +2430,11 @@ def rankings_view2(request,userid=0,
|
||||
velo = 500./p
|
||||
t = rankingdistance/velo
|
||||
pwr = 2.8*(velo**3)
|
||||
try:
|
||||
pwr = int(pwr)
|
||||
except ValueError:
|
||||
pwr = 0
|
||||
|
||||
a = {'distance':rankingdistance,
|
||||
'duration':timedeltaconv(t),
|
||||
'pace':timedeltaconv(p),
|
||||
|
||||
Reference in New Issue
Block a user