fix
This commit is contained in:
@@ -23,31 +23,6 @@ rpetotss = {
|
||||
10: 140,
|
||||
}
|
||||
|
||||
def rscore_approx(row):
|
||||
if row['rscore'] > 0:
|
||||
return row['rscore']
|
||||
if row['rscore'] == 0:
|
||||
if row['hrtss'] > 0:
|
||||
return row['hrtss']
|
||||
else:
|
||||
dd = 3600*row['duration'].hour+60*row['duration'].minute+row['duration'].second
|
||||
dd = dd/3600
|
||||
print(row['rpe'],dd,rpetotss[row['rpe']])
|
||||
return rpetotss[row['rpe']]*dd
|
||||
if row['rscore'] < 0:
|
||||
w = Workout.objects.get(id=row['id'])
|
||||
trimp, hrtss = dataprep.workout_trimp(w)
|
||||
rscore, normp = dataprep.workout_rscore(w)
|
||||
if row['rpe'] and row['rpe'] > 0:
|
||||
dd = 3600*row['duration'].hour+60*row['duration'].minute+row['duration'].second
|
||||
dd = dd/3600
|
||||
return rpetotss[row['rpe']]*dd
|
||||
else: # pragma: no cover
|
||||
minutes = row['duration'].hour*60+row['duration'].minute
|
||||
return minutes
|
||||
|
||||
print('boer')
|
||||
return 0
|
||||
|
||||
def updatecp(delta, cpvalues, r, workouttype='water'): # pragma: no cover
|
||||
if workouttype in otwtypes:
|
||||
|
||||
Reference in New Issue
Block a user