diff --git a/rowers/uploads.py b/rowers/uploads.py index a26fe6a3..b09c57d8 100644 --- a/rowers/uploads.py +++ b/rowers/uploads.py @@ -508,10 +508,11 @@ def make_private(w,options): return 1 def do_sync(w,options): + upload_to_strava = options['upload_to_Strava'] try: if options['stravaid'] != 0 and options['stravaid'] != '': w.uploadedtostrava = options['stravaid'] - options['upload_to_Strava'] = False + upload_to_strava = False w.save() except KeyError: pass @@ -524,7 +525,7 @@ def do_sync(w,options): id = 0 message = "Something went wrong with the Concept2 sync" - if ('upload_to_Strava' in options and options['upload_to_Strava']) or (w.user.strava_auto_export and ispromember(w.user.user)): + if ('upload_to_Strava' in options and upload_to_strava) or (w.user.strava_auto_export and ispromember(w.user.user)): try: message,id = stravastuff.workout_strava_upload( w.user.user,w