Private
Public Access
1
0

correcting no avghr and no maxhr workouts

This commit is contained in:
Sander Roosendaal
2018-11-29 12:28:08 +01:00
parent f8066c8c7d
commit 7a2f1b951f
3 changed files with 22 additions and 2 deletions

View File

@@ -2353,7 +2353,20 @@ def workout_trimp(w):
r.hrftp = int(hrftp)
r.save()
if w.averagehr is None:
rowdata = rdata(w.csvfilename)
try:
avghr = rowdata.df[' HRCur (bpm)'].mean()
maxhr = rowdata.df[' HRCur (bpm)'].max()
except KeyError:
avghr = None
maxhr = None
w.averagehr = avghr
w.maxhr = maxhr
w.save()
job = myqueue(
queuehigh,