Private
Public Access
1
0

bug fix and additional filtering for spm<0

This commit is contained in:
Sander Roosendaal
2018-03-02 10:37:24 +01:00
parent c1158747e3
commit 66452b44c0
4 changed files with 52 additions and 15 deletions

View File

@@ -2638,18 +2638,18 @@ def interactive_flex_chart2(id=0,promember=0,
rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=True,
workstrokesonly=False)
workstrokesonly=False
try:
tests = rowdata[yparam2]
except KeyError:
yparam2 = 'None'
try:
tests = rowdata[yparam1]
except KeyError:
yparam1 = 'None'
rowdata.dropna(axis=1,how='all',inplace=True)
# test if we have drive energy
nowork = 1
@@ -2670,7 +2670,7 @@ def interactive_flex_chart2(id=0,promember=0,
row = Workout.objects.get(id=id)
if rowdata.empty:
return "","No valid data"
return "","No valid data",'','',workstrokesonly
else:
try:
rowdata.sort_values(by='time',ascending=True,inplace=True)
@@ -2690,7 +2690,7 @@ def interactive_flex_chart2(id=0,promember=0,
try:
tseconds = rowdata.ix[:,'time']
except KeyError:
return '','No time data - cannot make flex plot','',''
return '','No time data - cannot make flex plot','','',workstrokesonly
try:
@@ -3098,7 +3098,7 @@ def interactive_flex_chart2(id=0,promember=0,
try:
distmax = 100+100*int(rowdata['distance'].max()/100.)
except KeyError:
except (KeyError,ValueError):
distmax = 100
slider_dist_min = Slider(start=0,end=distmax,value=0,step=1,