Private
Public Access
1
0

better treatment of impeller

This commit is contained in:
Sander Roosendaal
2021-04-08 08:22:56 +02:00
parent e7813e0d38
commit 5335213527
3 changed files with 37 additions and 4 deletions

View File

@@ -4953,6 +4953,11 @@ def workout_upload_api(request):
oarlength = None
try:
useImpeller = post_data['useImpeller']
except:
useImpeller = False
r = None
if form.is_valid():
t = form.cleaned_data['title']
@@ -5028,6 +5033,7 @@ def workout_upload_api(request):
oarlockfirmware=oarlockfirmware,
inboard=inboard,
oarlength=oarlength,
impeller=useImpeller,
)
if id == 0:
@@ -5059,6 +5065,21 @@ def workout_upload_api(request):
except KeyError:
pass
try:
totalDistance = post_data['totalDistance']
w.distance = totalDistance
w.save()
except KeyError:
pass
try:
elapsedTime = post_data['elapsedTime']
w.duration = totaltime_sec_to_string(elapsedTime)
except KeyError:
pass
try:
summary = post_data['summary']
w.summary = summary