attaching workout to planned session
This commit is contained in:
@@ -610,6 +610,7 @@ def handle_calctrimp(id,
|
||||
intensityfactor = normp/float(ftp)
|
||||
tss = 100.*((duration*normp*intensityfactor)/(3600.*ftp))
|
||||
|
||||
|
||||
if sex == 'male':
|
||||
f = 1.92
|
||||
else:
|
||||
@@ -646,6 +647,24 @@ def handle_calctrimp(id,
|
||||
if not np.isfinite(normw):
|
||||
normw = 0
|
||||
|
||||
try:
|
||||
dum = int(tss)
|
||||
except ValueError:
|
||||
tss = 0
|
||||
|
||||
try:
|
||||
dum = int(normp)
|
||||
except ValueError:
|
||||
normp = 0
|
||||
try:
|
||||
dump = int(trimp)
|
||||
except ValueError:
|
||||
trimp = 0
|
||||
try:
|
||||
dump = int(hrtss)
|
||||
except ValueError:
|
||||
hrtss = 0
|
||||
|
||||
query = 'UPDATE rowers_workout SET rscore = {tss}, normp = {normp}, trimp={trimp}, hrtss={hrtss}, normv={normv}, normw={normw} WHERE id={id}'.format(
|
||||
tss = int(tss),
|
||||
normp = int(normp),
|
||||
|
||||
Reference in New Issue
Block a user