fixing plannedsessions_view
This commit is contained in:
@@ -126,8 +126,7 @@ def rscore_approx(row):
|
||||
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
|
||||
return int(rpetotss[row['rpe']]*dd)
|
||||
if row['rscore'] < 0:
|
||||
w = Workout.objects.get(id=row['id'])
|
||||
trimp, hrtss = workout_trimp(w)
|
||||
@@ -135,12 +134,11 @@ def rscore_approx(row):
|
||||
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
|
||||
return int(rpetotss[row['rpe']]*dd)
|
||||
else: # pragma: no cover
|
||||
minutes = row['duration'].hour*60+row['duration'].minute
|
||||
return minutes
|
||||
|
||||
print('boer')
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user