cumulative flex now also for OTW
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user