autosync works for coachees
This commit is contained in:
@@ -84,6 +84,11 @@ def user_is_not_basic(user):
|
||||
if user.rower.protrialexpires >= timezone.now().date():
|
||||
return True # pragma: no cover
|
||||
|
||||
coaches = user.rower.get_coaches()
|
||||
for coach in coaches:
|
||||
if coach.rowerplan == 'coach':
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
|
||||
@@ -338,6 +338,12 @@ def handle_strava_sync(stravatoken, workoutid, filename, name, activity_type, de
|
||||
tb = traceback.format_exc()
|
||||
dologging('strava_fail.log', tb)
|
||||
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
|
||||
dologging('strava_fail.log', 'Strava upload failed for Workout {id} JSONDecodeError'.format(
|
||||
id=workoutid))
|
||||
|
||||
Reference in New Issue
Block a user