Private
Public Access
1
0

cumulative flex now also for OTW

This commit is contained in:
Sander Roosendaal
2017-05-03 15:54:54 +02:00
parent b0bb1d7d25
commit e2b8ab4664
4 changed files with 220 additions and 149 deletions

View File

@@ -853,7 +853,7 @@ def getrowdata_db(id=0,doclean=False):
def getsmallrowdata_db(columns,ids=[],doclean=True,workstrokesonly=True):
prepmultipledata(ids)
data = read_cols_df_sql(ids,columns)
if 'peakforce' in columns:
data['peakforce'] = data['peakforce']*lbstoN
if 'averageforce' in columns:
@@ -862,7 +862,7 @@ def getsmallrowdata_db(columns,ids=[],doclean=True,workstrokesonly=True):
if doclean:
data = clean_df_stats(data,ignorehr=True,
workstrokesonly=workstrokesonly)
return data
# Fetch both the workout and the workout stroke data (from CSV file)
@@ -921,7 +921,7 @@ def prepmultipledata(ids,verbose=False):
def read_cols_df_sql(ids,columns):
# drop columns that are not in offical list
# axx = [ax[0] for ax in axes]
axx = StrokeData._meta.get_all_field_names()
axx = [f.name for f in StrokeData._meta.get_fields()]
for c in columns:
if not c in axx:
columns.remove(c)