removed try/except in c2stuff
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user