diff --git a/rowers/c2stuff.py b/rowers/c2stuff.py index 97507c7f..11810301 100644 --- a/rowers/c2stuff.py +++ b/rowers/c2stuff.py @@ -752,20 +752,16 @@ def workout_c2_upload(user,w): c2id = -1 w.save() elif (response.status_code == 201 or response.status_code == 200): - try: -# s= json.loads(response.text) - s = response.json() - c2id = s['data']['id'] - w.uploadedtoc2 = c2id - w.save() - message = "Upload to Concept2 was successful" - except: - message = "Something went wrong in workout_c2_upload_view. Response code 200/201 but C2 sync failed: "+response.text - c2id = 0 + # s= json.loads(response.text) + s = response.json() + c2id = s['data']['id'] + w.uploadedtoc2 = c2id + w.save() + message = "Upload to Concept2 was successful" + # except: + # message = "Something went wrong in workout_c2_upload_view. Response code 200/201 but C2 sync failed: "+response.text + # c2id = 0 - else: - message = "Something went wrong in workout_c2_upload_view. Response code 200/201 but C2 sync failed: "+response.text - c2id = 0 return message,c2id