should pass tests now
This commit is contained in:
@@ -585,8 +585,11 @@ def addmanual_view(request,raceid=0):
|
||||
weightcategory = form.cleaned_data['weightcategory']
|
||||
adaptiveclass = form.cleaned_data['adaptiveclass']
|
||||
distance = form.cleaned_data['distance']
|
||||
rpe = form.cleaned_data['rpe']
|
||||
if not rpe:
|
||||
try:
|
||||
rpe = form.cleaned_data['rpe']
|
||||
if not rpe:
|
||||
rpe = -1
|
||||
except KeyError:
|
||||
rpe = -1
|
||||
notes = form.cleaned_data['notes']
|
||||
thetimezone = form.cleaned_data['timezone']
|
||||
@@ -4361,8 +4364,11 @@ def workout_edit_view(request,id=0,message="",successmessage=""):
|
||||
notes = form.cleaned_data['notes']
|
||||
newdragfactor = form.cleaned_data['dragfactor']
|
||||
thetimezone = form.cleaned_data['timezone']
|
||||
rpe = form.cleaned_data['rpe']
|
||||
if not rpe:
|
||||
try:
|
||||
rpe = form.cleaned_data['rpe']
|
||||
if not rpe:
|
||||
rpe = -1
|
||||
except KeyError:
|
||||
rpe = -1
|
||||
|
||||
try:
|
||||
@@ -4874,6 +4880,10 @@ def workout_upload_api(request):
|
||||
t = form.cleaned_data['title']
|
||||
boattype = form.cleaned_data['boattype']
|
||||
workouttype = form.cleaned_data['workouttype']
|
||||
try:
|
||||
rpe = form.cleaned_data['rpe']
|
||||
except KeyError:
|
||||
rpe = -1
|
||||
if rowerform.is_valid():
|
||||
u = rowerform.cleaned_data['user']
|
||||
r = getrower(u)
|
||||
@@ -4929,6 +4939,7 @@ def workout_upload_api(request):
|
||||
boattype=boattype,
|
||||
makeprivate=makeprivate,
|
||||
title = t,
|
||||
rpe=rpe,
|
||||
notes=notes,
|
||||
uploadoptions=post_data,
|
||||
)
|
||||
@@ -5049,6 +5060,13 @@ def workout_upload_view(request,
|
||||
except KeyError:
|
||||
boattype = '1x'
|
||||
|
||||
try:
|
||||
rpe = docformoptions['rpe']
|
||||
if not rpe:
|
||||
rpe = -1
|
||||
except KeyError:
|
||||
rpe = -1
|
||||
|
||||
try:
|
||||
notes = docformoptions['notes']
|
||||
except KeyError:
|
||||
@@ -5126,6 +5144,10 @@ def workout_upload_view(request,
|
||||
t = form.cleaned_data['title']
|
||||
workouttype = form.cleaned_data['workouttype']
|
||||
boattype = form.cleaned_data['boattype']
|
||||
try:
|
||||
rpe = form.cleaned_data['rpe']
|
||||
except KeyError:
|
||||
rpe = -1
|
||||
|
||||
request.session['docformoptions'] = {
|
||||
'workouttype':workouttype,
|
||||
@@ -5166,6 +5188,7 @@ def workout_upload_view(request,
|
||||
'upload_to_TrainingPeaks':upload_to_tp,
|
||||
'landingpage':landingpage,
|
||||
'boattype': boattype,
|
||||
'rpe':rpe,
|
||||
'workouttype': workouttype,
|
||||
}
|
||||
|
||||
@@ -5181,6 +5204,7 @@ def workout_upload_view(request,
|
||||
workouttype=workouttype,
|
||||
workoutsource=workoutsource,
|
||||
boattype=boattype,
|
||||
rpe=rpe,
|
||||
makeprivate=makeprivate,
|
||||
title = t,
|
||||
notes=notes,
|
||||
|
||||
Reference in New Issue
Block a user