Private
Public Access
1
0

added workstrokesonly fix flex chart datacleaning

This commit is contained in:
Sander Roosendaal
2017-03-08 07:22:10 +01:00
parent f654ef1c6d
commit 1b65d18de4
4 changed files with 7 additions and 3 deletions

View File

@@ -0,0 +1 @@
E408191@CZ27LT9RCGN72.15972:1488820163

View File

@@ -753,11 +753,12 @@ def getrowdata_db(id=0,doclean=False):
return data,row
# Fetch a subset of the data from the DB
def getsmallrowdata_db(columns,ids=[],doclean=True):
def getsmallrowdata_db(columns,ids=[],doclean=True,workstrokesonly=True):
prepmultipledata(ids)
data = read_cols_df_sql(ids,columns)
if doclean:
data = clean_df_stats(data,ignorehr=True)
data = clean_df_stats(data,ignorehr=True,
workstrokesonly=workstrokesonly)
return data

View File

@@ -1198,7 +1198,8 @@ def interactive_flex_chart2(id=0,promember=0,
'power','hr','spm','driveenergy',
'time','pace','workoutstate']
rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=True)
rowdata = dataprep.getsmallrowdata_db(columns,ids=[id],doclean=True,
workstrokesonly=workstrokesonly)
rowdata.dropna(axis=1,how='all',inplace=True)
rowdata.dropna(axis=0,how='any',inplace=True)

View File

@@ -3406,6 +3406,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
yparam1=yparam1,yparam2=yparam2,
plottype=plottype,workouttype=workouttype,
reststrokes=reststrokes)
f.save()
if request.method == 'POST' and 'workstrokesonly' in request.POST:
workstrokesonly = request.POST['workstrokesonly']