Private
Public Access
1
0

sporttracks and strava warning when no data

This commit is contained in:
Sander Roosendaal
2017-01-12 21:37:14 +01:00
parent aaa687aa9e
commit 3e4a5c060d
3 changed files with 54 additions and 30 deletions

View File

@@ -176,7 +176,11 @@ def get_sporttracks_workout(user,sporttracksid):
def createsporttracksworkoutdata(w):
filename = w.csvfilename
row = rowingdata(filename)
try:
row = rowingdata(filename)
except:
return 0
averagehr = int(row.df[' HRCur (bpm)'].mean())
maxhr = int(row.df[' HRCur (bpm)'].max())