adding more debugging
This commit is contained in:
@@ -4392,7 +4392,7 @@ def workout_toggle_ranking(request,id=0):
|
||||
# simple POST API for files on local (e.g. in mailbox)
|
||||
@csrf_exempt
|
||||
def workout_upload_api(request):
|
||||
stravaid = 0
|
||||
stravaid = ''
|
||||
if request.method != 'POST':
|
||||
message = {'status':'false','message':'this view cannot be accessed through GET'}
|
||||
return JSONResponse(status=403,data=message)
|
||||
@@ -4445,7 +4445,7 @@ def workout_upload_api(request):
|
||||
try:
|
||||
stravaid = post_data['stravaid']
|
||||
except KeyError:
|
||||
stravaid = 0
|
||||
stravaid = ''
|
||||
|
||||
if form.is_valid():
|
||||
t = form.cleaned_data['title']
|
||||
@@ -4497,8 +4497,10 @@ def workout_upload_api(request):
|
||||
return JSONResponse(status=400,data=message)
|
||||
|
||||
w = Workout.objects.get(id=id)
|
||||
if stravaid != 0:
|
||||
if stravaid:
|
||||
print('setting Strava id',stravaid)
|
||||
w.uploadedtostrava = stravaid
|
||||
print(w,w.id,w.user)
|
||||
w.save()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user