skips CP calculation when OTW workout has no power data
This commit is contained in:
@@ -733,7 +733,7 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
|||||||
ishard = False
|
ishard = False
|
||||||
if workouttype == 'water':
|
if workouttype == 'water':
|
||||||
df = getsmallrowdata_db(['power', 'workoutid', 'time'], ids=[w.id])
|
df = getsmallrowdata_db(['power', 'workoutid', 'time'], ids=[w.id])
|
||||||
# delta,cpvalues,avgpower = datautils.getsinglecp(row.df)
|
if df['power'].mean():
|
||||||
thesecs = totaltime
|
thesecs = totaltime
|
||||||
maxt = 1.05 * thesecs
|
maxt = 1.05 * thesecs
|
||||||
if maxt > 0:
|
if maxt > 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user