fixed a few bgs
This commit is contained in:
@@ -1404,7 +1404,10 @@ def interactive_flex_chart2(id=0,promember=0,
|
|||||||
if rowdata.empty:
|
if rowdata.empty:
|
||||||
return "","No valid data"
|
return "","No valid data"
|
||||||
else:
|
else:
|
||||||
rowdata.sort_values(by='time',ascending=True,inplace=True)
|
try:
|
||||||
|
rowdata.sort_values(by='time',ascending=True,inplace=True)
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
workoutstateswork = [1,4,5,8,9,6,7]
|
workoutstateswork = [1,4,5,8,9,6,7]
|
||||||
workoutstatesrest = [3]
|
workoutstatesrest = [3]
|
||||||
|
|||||||
@@ -4368,18 +4368,20 @@ def workout_stats_view(request,id=0,message="",successmessage=""):
|
|||||||
intensityfactor = normp/float(r.ftp)
|
intensityfactor = normp/float(r.ftp)
|
||||||
tss = 100.*((duration*normp*intensityfactor)/(3600.*r.ftp))
|
tss = 100.*((duration*normp*intensityfactor)/(3600.*r.ftp))
|
||||||
|
|
||||||
|
if not np.isnan(tss):
|
||||||
|
otherstats['tss'] = {
|
||||||
|
'verbose_name':'rScore',
|
||||||
|
'value':int(tss),
|
||||||
|
'unit':''
|
||||||
|
}
|
||||||
|
|
||||||
|
if not np.isnan(normp):
|
||||||
otherstats['np'] = {
|
otherstats['np'] = {
|
||||||
'verbose_name':'rPower',
|
'verbose_name':'rPower',
|
||||||
'value':int(10*normp)/10.,
|
'value':int(10*normp)/10.,
|
||||||
'unit':'Watt'
|
'unit':'Watt'
|
||||||
}
|
}
|
||||||
|
|
||||||
otherstats['tss'] = {
|
|
||||||
'verbose_name':'rScore',
|
|
||||||
'value':int(tss),
|
|
||||||
'unit':''
|
|
||||||
}
|
|
||||||
|
|
||||||
# HR Drift
|
# HR Drift
|
||||||
tmax = datadf['time'].max()
|
tmax = datadf['time'].max()
|
||||||
tmin = datadf['time'].min()
|
tmin = datadf['time'].min()
|
||||||
|
|||||||
Reference in New Issue
Block a user