more fxi
This commit is contained in:
@@ -4454,10 +4454,10 @@ def workout_upload_api(request):
|
|||||||
r = getrower(u)
|
r = getrower(u)
|
||||||
else:
|
else:
|
||||||
message = {'status':'false','message':'could not find user'}
|
message = {'status':'false','message':'could not find user'}
|
||||||
return JSonResponse(status=400,data=message)
|
return JSONResponse(status=400,data=message)
|
||||||
else:
|
else:
|
||||||
message = {'status':'false','message':'invalid user'}
|
message = {'status':'false','message':'invalid user'}
|
||||||
return JSonResponse(status=400,data=message)
|
return JSONResponse(status=400,data=message)
|
||||||
|
|
||||||
notes = form.cleaned_data['notes']
|
notes = form.cleaned_data['notes']
|
||||||
if optionsform.is_valid():
|
if optionsform.is_valid():
|
||||||
@@ -4472,7 +4472,7 @@ def workout_upload_api(request):
|
|||||||
makeprivate = optionsform.cleaned_data['makeprivate']
|
makeprivate = optionsform.cleaned_data['makeprivate']
|
||||||
else:
|
else:
|
||||||
message = optionsform.errors
|
message = optionsform.errors
|
||||||
return JSonResponse(status=400,data=message)
|
return JSONResponse(status=400,data=message)
|
||||||
|
|
||||||
|
|
||||||
id, message, f2 = dataprep.new_workout_from_file(
|
id, message, f2 = dataprep.new_workout_from_file(
|
||||||
@@ -4487,7 +4487,7 @@ def workout_upload_api(request):
|
|||||||
|
|
||||||
if id <= 0:
|
if id <= 0:
|
||||||
message = {'status':'false','message':'unable to process file'}
|
message = {'status':'false','message':'unable to process file'}
|
||||||
return JSonResponse(status=400,data=message)
|
return JSONResponse(status=400,data=message)
|
||||||
|
|
||||||
w = Workout.objects.get(id=id)
|
w = Workout.objects.get(id=id)
|
||||||
|
|
||||||
@@ -4532,7 +4532,7 @@ def workout_upload_api(request):
|
|||||||
|
|
||||||
else: # form invalid
|
else: # form invalid
|
||||||
message = form.errors
|
message = form.errors
|
||||||
return JsonResponse(status=400,data=message)
|
return JSONResponse(status=400,data=message)
|
||||||
|
|
||||||
message = {'status': 'true','id':w.id}
|
message = {'status': 'true','id':w.id}
|
||||||
return JSONResponse(status=200,data=message)
|
return JSONResponse(status=200,data=message)
|
||||||
|
|||||||
Reference in New Issue
Block a user