Merge branch 'release/v16.4.25'
This commit is contained in:
@@ -139,9 +139,8 @@ def get_rp3_workouts(rower,do_async=True): # pragma: no cover
|
||||
try:
|
||||
rp3ids = workouts_list['id'].values
|
||||
workouts_list.set_index('id',inplace=True)
|
||||
return 0
|
||||
except IndexError:
|
||||
rp3ids = []
|
||||
return 0
|
||||
|
||||
knownrp3ids = uniqify([
|
||||
w.uploadedtorp3 for w in Workout.objects.filter(user=rower)
|
||||
|
||||
@@ -335,6 +335,8 @@ def handle_strava_sync(stravatoken,workoutid,filename,name,activity_type,descrip
|
||||
failed = True
|
||||
except stravalib.exc.ObjectNotFound: # pragma: no cover
|
||||
failed = True
|
||||
except IndexError:
|
||||
failed = True
|
||||
except ActivityUploadFailed: # pragma: no cover
|
||||
failed = True
|
||||
except FileNotFoundError:
|
||||
@@ -3395,8 +3397,10 @@ def fetch_strava_workout(stravatoken,oauth_data,stravaid,csvfilename,userid,debu
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
workoutsummary = requests.get(url,headers=headers).json()
|
||||
try:
|
||||
workoutsummary = requests.get(url,headers=headers).json()
|
||||
except:
|
||||
return 0
|
||||
|
||||
|
||||
try:
|
||||
@@ -3500,8 +3504,12 @@ def fetch_strava_workout(stravatoken,oauth_data,stravaid,csvfilename,userid,debu
|
||||
if workouttype.lower() == 'rowing': # pragma: no cover
|
||||
workouttype = 'rower'
|
||||
|
||||
if 'summary_polyline' in workoutsummary['map'] and workouttype=='rower': # pragma: no cover
|
||||
workouttype = 'water'
|
||||
|
||||
try:
|
||||
if 'summary_polyline' in workoutsummary['map'] and workouttype=='rower': # pragma: no cover
|
||||
workouttype = 'water'
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
comments = workoutsummary['comments']
|
||||
|
||||
Reference in New Issue
Block a user