Private
Public Access
1
0

autosync works for coachees

This commit is contained in:
Sander Roosendaal
2022-06-20 21:18:31 +02:00
parent adf1002809
commit 046e1d2d07
2 changed files with 11 additions and 0 deletions

View File

@@ -84,6 +84,11 @@ def user_is_not_basic(user):
if user.rower.protrialexpires >= timezone.now().date(): if user.rower.protrialexpires >= timezone.now().date():
return True # pragma: no cover return True # pragma: no cover
coaches = user.rower.get_coaches()
for coach in coaches:
if coach.rowerplan == 'coach':
return True
return False return False

View File

@@ -338,6 +338,12 @@ def handle_strava_sync(stravatoken, workoutid, filename, name, activity_type, de
tb = traceback.format_exc() tb = traceback.format_exc()
dologging('strava_fail.log', tb) dologging('strava_fail.log', tb)
failed = True failed = True
except stravalib.exc.TimeoutExceeded:
dologging('strava_fail.log', 'Strava upload failed for Workout {id} TimeOutExceeded'.format(
id=workoutid))
tb = traceback.format_exc()
dologging('strava_fail.log', tb)
failed = True
except JSONDecodeError: # pragma: no cover except JSONDecodeError: # pragma: no cover
dologging('strava_fail.log', 'Strava upload failed for Workout {id} JSONDecodeError'.format( dologging('strava_fail.log', 'Strava upload failed for Workout {id} JSONDecodeError'.format(
id=workoutid)) id=workoutid))