video bug fix
This commit is contained in:
@@ -179,6 +179,8 @@ def handle_strava_sync(stravatoken,workoutid,filename,name,activity_type,descrip
|
||||
res = act.wait(poll_interval=5.0, timeout=60)
|
||||
except ActivityUploadFailed:
|
||||
failed = True
|
||||
except JSONDecodeError:
|
||||
failed = True
|
||||
if not failed:
|
||||
try:
|
||||
act = client.update_activity(res.id,activity_type=activity_type,
|
||||
@@ -730,6 +732,24 @@ def handle_calctrimp(id,
|
||||
normw = response.normw
|
||||
hrtss = response.hrtss
|
||||
|
||||
if np.isnan(tss):
|
||||
tss = 0
|
||||
|
||||
if np.isnan(normp):
|
||||
normp = 0
|
||||
|
||||
if np.isnan(trimp):
|
||||
trimp = 0
|
||||
|
||||
if np.isnan(normv):
|
||||
normv = 0
|
||||
|
||||
if np.isnan(normw):
|
||||
normw = 0
|
||||
|
||||
if np.isnan(hrtss):
|
||||
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),
|
||||
|
||||
Reference in New Issue
Block a user