Private
Public Access
1
0
This commit is contained in:
2024-01-10 19:11:21 +01:00
parent 0c12bec57e
commit a23f49cc6e
3 changed files with 7 additions and 2 deletions

View File

@@ -796,7 +796,9 @@ def handle_strava_sync(stravatoken,
if 'LatLon' in tb:
dologging('strava_fail.log', 'Trying temporary fix')
failed = False
except (ActivityUploadFailed, stravalib.exc.RateLimitExceeded, JSONDecodeError): # pragma: no cover
except (
ActivityUploadFailed, stravalib.exc.RateLimitExceeded, JSONDecodeError
): # pragma: no cover
dologging(
'strava_fail.log', 'Strava upload failed for Workout {id}'.format(id=workoutid))
tb = traceback.format_exc()

Binary file not shown.

View File

@@ -2809,7 +2809,10 @@ def history_view_data(request, userid=0):
ddf = dataprep.clean_df_stats(ddf, workstrokesonly=False,
ignoreadvanced=True)
ddict['hrmean'] = int(wavg(ddf, 'hr', 'deltat'))
try:
ddict['hrmean'] = int(wavg(ddf, 'hr', 'deltat'))
except (KeyError, ValueError, AttributeError): # pragma: no cover
ddict['hrmean'] = 0
try:
ddict['hrmax'] = ddf['hr'].max().astype(int)
except (KeyError, ValueError, AttributeError): # pragma: no cover