tests should now pass
This commit is contained in:
@@ -1691,12 +1691,14 @@ def getrowdata_db(id=0, doclean=False, convertnewtons=True,
|
||||
row = Workout.objects.get(id=id)
|
||||
|
||||
|
||||
|
||||
if not data.empty and data['efficiency'].mean() == 0 and data['power'].mean() != 0 and checkefficiency == True:
|
||||
data = add_efficiency(id=id)
|
||||
|
||||
if doclean:
|
||||
data = clean_df_stats(data, ignorehr=True)
|
||||
|
||||
|
||||
return data, row
|
||||
|
||||
# Fetch a subset of the data from the DB
|
||||
@@ -2047,19 +2049,6 @@ def read_df_sql(id):
|
||||
|
||||
df = df.fillna(value=0)
|
||||
|
||||
funit = Workout.objects.get(id=id).forceunit
|
||||
|
||||
if funit == 'lbs':
|
||||
try:
|
||||
df['peakforce'] = df['peakforce'] * lbstoN
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
df['averageforce'] = df['averageforce'] * lbstoN
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
return df
|
||||
|
||||
def read_df_sql_old(id):
|
||||
|
||||
Reference in New Issue
Block a user