bug fixes
This commit is contained in:
@@ -405,12 +405,13 @@ def handle_getagegrouprecords(self,
|
||||
weightcategory=weightcategory,indf=df,
|
||||
)
|
||||
velo = (worldclasspower/2.8)**(1./3.)
|
||||
try:
|
||||
duration = distance/velo
|
||||
wcdurations.append(duration)
|
||||
wcpower.append(worldclasspower)
|
||||
except ZeroDivisionError:
|
||||
pass
|
||||
if not np.isinf(worldclasspower) and not np.isnan(worldclasspower):
|
||||
try:
|
||||
duration = distance/velo
|
||||
wcdurations.append(duration)
|
||||
wcpower.append(worldclasspower)
|
||||
except ZeroDivisionError:
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@@ -421,13 +422,14 @@ def handle_getagegrouprecords(self,
|
||||
duration=duration,
|
||||
weightcategory=weightcategory,indf=df
|
||||
)
|
||||
try:
|
||||
velo = (worldclasspower/2.8)**(1./3.)
|
||||
distance = int(60*duration*velo)
|
||||
wcdurations.append(60.*duration)
|
||||
wcpower.append(worldclasspower)
|
||||
except ValueError:
|
||||
pass
|
||||
if not np.isinf(worldclasspower) and not np.isnan(worldclasspower):
|
||||
try:
|
||||
velo = (worldclasspower/2.8)**(1./3.)
|
||||
distance = int(60*duration*velo)
|
||||
wcdurations.append(60.*duration)
|
||||
wcpower.append(worldclasspower)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
update_agegroup_db(age,sex,weightcategory,wcdurations,wcpower,
|
||||
debug=debug)
|
||||
|
||||
Reference in New Issue
Block a user