diff --git a/rowers/stravastuff.py b/rowers/stravastuff.py index d1e1ac86..e53fa108 100644 --- a/rowers/stravastuff.py +++ b/rowers/stravastuff.py @@ -311,7 +311,10 @@ def handle_stravaexport(f2,workoutname,stravatoken,description='', # description doesn't work yet. Have to wait for stravalib to update if res: - act = client.update_activity(res.id,activity_type=activity_type,description=description,device_name='Rowsandall.com') + try: + act = client.update_activity(res.id,activity_type=activity_type,description=description,device_name='Rowsandall.com') + except TypeError: + act = client.update_activity(res.id,activity_type=activity_type,description=description) else: message = 'Strava activity update timed out.' return (0,message) diff --git a/rowers/views.py b/rowers/views.py index 4c212de6..bf5f555a 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -7462,7 +7462,10 @@ def workout_flexchart3_view(request,*args,**kwargs): if not request.user.is_anonymous(): r = getrower(request.user) if favoritenr>=0 and r.showfavoritechartnotes: - favoritechartnotes = favorites[favoritenr].notes + try: + favoritechartnotes = favorites[favoritenr].notes + except IndexError: + favoritechartnotes = '' else: favoritechartnotes = '' else: