correcting no avghr and no maxhr workouts
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user