Private
Public Access
1
0

added boat type to upload form

This commit is contained in:
Sander Roosendaal
2018-06-01 16:18:33 +02:00
parent 4dbc08b6ba
commit c4475973f9
5 changed files with 26 additions and 4 deletions

View File

@@ -10150,6 +10150,11 @@ def workout_upload_view(request,
except KeyError:
workouttype = 'rower'
try:
boattype = docformoptions['boattype']
except KeyError:
boattype = '1x'
try:
plottype = uploadoptions['plottype']
except KeyError:
@@ -10213,8 +10218,11 @@ def workout_upload_view(request,
t = form.cleaned_data['title']
workouttype = form.cleaned_data['workouttype']
boattype = form.cleaned_data['boattype']
request.session['docformoptions'] = {
'workouttype':workouttype,
'boattype': boattype,
}
notes = form.cleaned_data['notes']
@@ -10243,6 +10251,8 @@ def workout_upload_view(request,
'upload_to_MapMyFitness':upload_to_ua,
'upload_to_TrainingPeaks':upload_to_tp,
'landingpage':landingpage,
'boattype': boattype,
'workouttype': workouttype,
}
@@ -10255,6 +10265,7 @@ def workout_upload_view(request,
id,message,f2 = dataprep.new_workout_from_file(
r,f2,
workouttype=workouttype,
boattype=boattype,
makeprivate=makeprivate,
title = t,
notes=''
@@ -10529,6 +10540,7 @@ def team_workout_upload_view(request,message="",
id,message,f2 = dataprep.new_workout_from_file(
r,f2,
workouttype=workouttype,
boattype=boattype,
makeprivate=False,
title = t,
notes=''