hotfix hrftp
This commit is contained in:
@@ -2307,7 +2307,7 @@ def workout_trimp(workout):
|
||||
r = workout.user
|
||||
if r.hrftp == 0:
|
||||
hrftp = (r.an+r.tr)/2.
|
||||
r.hrftp = hrftp
|
||||
r.hrftp = int(hrftp)
|
||||
r.save()
|
||||
|
||||
df,row = getrowdata_db(id=workout.id)
|
||||
@@ -2316,8 +2316,14 @@ def workout_trimp(workout):
|
||||
df,row = getrowdata_db(id=workout.id)
|
||||
df = clean_df_stats(df,workstrokesonly=False)
|
||||
trimp,hrtss = calc_trimp(df,r.sex,r.max,r.rest,r.hrftp)
|
||||
trimp = int(trimp)
|
||||
hrtss = int(hrtss)
|
||||
if not np.isnan(trimp):
|
||||
trimp = int(trimp)
|
||||
else:
|
||||
trimp = 0
|
||||
if not np.isnan(hrtss):
|
||||
hrtss = int(hrtss)
|
||||
else:
|
||||
hrtss = 0
|
||||
|
||||
return trimp,hrtss
|
||||
|
||||
|
||||
Reference in New Issue
Block a user