Private
Public Access
1
0

fix and trial

This commit is contained in:
Sander Roosendaal
2020-10-20 07:40:58 +02:00
parent 519f1edae4
commit 31f078f60e
2 changed files with 5 additions and 2 deletions

View File

@@ -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:

View File

@@ -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