changing return status:
This commit is contained in:
@@ -575,7 +575,7 @@ def strokedata_fit(request):
|
|||||||
return JsonResponse({
|
return JsonResponse({
|
||||||
"status": "error",
|
"status": "error",
|
||||||
"message": f"An error occurred while saving the FIT file: {str(e)}"
|
"message": f"An error occurred while saving the FIT file: {str(e)}"
|
||||||
}, status=500)
|
}, status=400)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Parse the FIT file
|
# Parse the FIT file
|
||||||
@@ -585,7 +585,7 @@ def strokedata_fit(request):
|
|||||||
return JsonResponse({
|
return JsonResponse({
|
||||||
"status": "error",
|
"status": "error",
|
||||||
"message": f"An error occurred while parsing the FIT file: {str(e)}"
|
"message": f"An error occurred while parsing the FIT file: {str(e)}"
|
||||||
}, status=500)
|
}, status=422)
|
||||||
|
|
||||||
rowdata = rowingdata(df=row.df)
|
rowdata = rowingdata(df=row.df)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user