Private
Public Access
1
0

fixing strava export bug

This commit is contained in:
Sander Roosendaal
2019-12-29 09:31:06 +01:00
parent 961d66a19e
commit ad249b8c6d
2 changed files with 20 additions and 20 deletions

View File

@@ -506,6 +506,7 @@ def do_sync(w,options):
try:
if options['stravaid'] != 0:
w.uploadedtostrava = options['stravaid']
options['upload_to_Strava'] = False
w.save()
except KeyError:
pass
@@ -524,14 +525,13 @@ def do_sync(w,options):
if ('upload_to_Strava' in options and not options['upload_to_Strava']):
pass
else:
if options['stravaid'] != 0:
try:
message,id = stravastuff.workout_strava_upload(
w.user.user,w
)
except NoTokenError:
id = 0
message = "Please connect to Strava first"
try:
message,id = stravastuff.workout_strava_upload(
w.user.user,w
)
except NoTokenError:
id = 0
message = "Please connect to Strava first"
if ('upload_to_SportTracks' in options and options['upload_to_SportTracks']) or (w.user.sporttracks_auto_export and isprorower(w.user)):