Private
Public Access
1
0

skips CP calculation when OTW workout has no power data

This commit is contained in:
Sander Roosendaal
2017-10-25 16:49:38 +02:00
parent 42d9b19a28
commit ae520e346f

View File

@@ -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: