fix and trial
This commit is contained in:
@@ -2711,7 +2711,10 @@ def handle_setcp(strokesdf,filename,workoutid,debug=False,**kwargs):
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
if not strokesdf.empty:
|
||||
totaltime = strokesdf['time'].max()
|
||||
try:
|
||||
totaltime = strokesdf['time'].max()
|
||||
except KeyError:
|
||||
return 0
|
||||
try:
|
||||
powermean = strokesdf['power'].mean()
|
||||
except KeyError:
|
||||
|
||||
@@ -81,7 +81,7 @@ from rest_framework_swagger.renderers import OpenAPIRenderer, SwaggerUIRenderer
|
||||
@csrf_exempt
|
||||
@login_required()
|
||||
@api_view(["GET","POST"])
|
||||
@permission_classes([IsAuthenticated])
|
||||
#@permission_classes([IsAuthenticated])
|
||||
def strokedatajson_v2(request,id):
|
||||
"""
|
||||
POST: Add Stroke data to workout
|
||||
|
||||
Reference in New Issue
Block a user