Private
Public Access
1
0

workouts without power

This commit is contained in:
Sander Roosendaal
2018-03-16 19:47:21 +01:00
parent b5e79c5141
commit 1c8f80494c

View File

@@ -1044,7 +1044,12 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
ishard = False
if workouttype == 'water':
df = getsmallrowdata_db(['power', 'workoutid', 'time'], ids=[w.id])
if df['power'].mean():
try:
powermean = df['power'].mean()
except KeyError:
powermean = 0
if powermean != 0:
thesecs = totaltime
maxt = 1.05 * thesecs
if maxt > 0: