diff --git a/rowers/c2stuff.py b/rowers/c2stuff.py index 6cb34ded..4fcbd5e9 100644 --- a/rowers/c2stuff.py +++ b/rowers/c2stuff.py @@ -859,7 +859,7 @@ def default(o): raise TypeError # Uploading workout -def workout_c2_upload(user,w,async=False): +def workout_c2_upload(user,w,asynchron=False): message = 'trying C2 upload' try: if mytypes.c2mapping[w.workouttype] is None: @@ -888,7 +888,7 @@ def workout_c2_upload(user,w,async=False): 'Content-Type': 'application/json'} import urllib url = "https://log.concept2.com/api/users/%s/results" % (c2userid) - if not async: + if not asynchron: response = requests.post(url,headers=headers,data=json.dumps(data,default=default)) diff --git a/rowers/uploads.py b/rowers/uploads.py index a48361e7..ef2f5a4e 100644 --- a/rowers/uploads.py +++ b/rowers/uploads.py @@ -525,7 +525,7 @@ def do_sync(w,options, quick=False): if ('upload_to_C2' in options and options['upload_to_C2']) or (w.user.c2_auto_export and ispromember(w.user.user)): try: - message,id = c2stuff.workout_c2_upload(w.user.user,w,async=True) + message,id = c2stuff.workout_c2_upload(w.user.user,w,asynchron=True) except NoTokenError: id = 0 message = "Something went wrong with the Concept2 sync"