Private
Public Access
1
0

bug fix in C2 upload

This commit is contained in:
Sander Roosendaal
2017-03-12 23:21:18 +01:00
parent d9e9fbcdcd
commit a1023884bd
3 changed files with 27 additions and 1 deletions

View File

@@ -895,6 +895,16 @@ def workout_c2_upload_view(request,id=0):
return HttpResponseRedirect("/rowers/me/c2authorize")
data = c2stuff.createc2workoutdata(w)
if data == 0:
message = "Error: No data file. Contact info@rowsandall.com if this problem persists"
url = reverse(workout_export_view,
kwargs = {
'message':str(message),
'id':str(w.id),
})
return HttpResponseRedirect(url)
authorizationstring = str('Bearer ' + thetoken)
headers = {'Authorization': authorizationstring,
'user-agent': 'sanderroosendaal',