removing old power calc
This commit is contained in:
@@ -3202,12 +3202,12 @@ class WorkoutForm(ModelForm):
|
|||||||
|
|
||||||
# Used for the rowing physics calculations
|
# Used for the rowing physics calculations
|
||||||
class AdvancedWorkoutForm(ModelForm):
|
class AdvancedWorkoutForm(ModelForm):
|
||||||
quick_calc = forms.BooleanField(initial=True,required=False)
|
#quick_calc = forms.BooleanField(initial=True,required=False)
|
||||||
go_service = forms.BooleanField(initial=False,required=False,label='Experimental')
|
#go_service = forms.BooleanField(initial=False,required=False,label='Experimental')
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Workout
|
model = Workout
|
||||||
fields = ['boattype','weightvalue','quick_calc']
|
fields = ['boattype','weightvalue']
|
||||||
|
|
||||||
class RowerExportForm(ModelForm):
|
class RowerExportForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|||||||
@@ -1516,19 +1516,11 @@ def handle_otwsetpower(self,f1, boattype, weightvalue,
|
|||||||
else:
|
else:
|
||||||
debug = False
|
debug = False
|
||||||
|
|
||||||
if 'quick_calc' in kwargs:
|
|
||||||
usetable = kwargs['quick_calc']
|
|
||||||
else:
|
|
||||||
usetable = False
|
|
||||||
|
|
||||||
if 'go_service' in kwargs:
|
|
||||||
goservice = kwargs['go_service']
|
|
||||||
else:
|
|
||||||
goservice = False
|
|
||||||
|
|
||||||
kwargs['jobid'] = job_id
|
kwargs['jobid'] = job_id
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
weightvalue = float(weightvalue)
|
weightvalue = float(weightvalue)
|
||||||
|
|
||||||
# check what the real file name is
|
# check what the real file name is
|
||||||
@@ -1569,6 +1561,8 @@ def handle_otwsetpower(self,f1, boattype, weightvalue,
|
|||||||
progressurl += "/rowers/record-progress/"
|
progressurl += "/rowers/record-progress/"
|
||||||
progressurl += job_id+'/'
|
progressurl += job_id+'/'
|
||||||
|
|
||||||
|
goservice = True
|
||||||
|
|
||||||
if goservice:
|
if goservice:
|
||||||
# do something (this should return from go service)
|
# do something (this should return from go service)
|
||||||
with grpc.insecure_channel(
|
with grpc.insecure_channel(
|
||||||
|
|||||||
@@ -2623,8 +2623,8 @@ def workout_otwsetpower_view(request,id=0,message="",successmessage=""):
|
|||||||
form = AdvancedWorkoutForm(request.POST)
|
form = AdvancedWorkoutForm(request.POST)
|
||||||
|
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
quick_calc = form.cleaned_data['quick_calc']
|
#quick_calc = form.cleaned_data['quick_calc']
|
||||||
go_service = form.cleaned_data['go_service']
|
#go_service = form.cleaned_data['go_service']
|
||||||
boattype = form.cleaned_data['boattype']
|
boattype = form.cleaned_data['boattype']
|
||||||
weightvalue = form.cleaned_data['weightvalue']
|
weightvalue = form.cleaned_data['weightvalue']
|
||||||
w.boattype = boattype
|
w.boattype = boattype
|
||||||
@@ -2669,8 +2669,8 @@ def workout_otwsetpower_view(request,id=0,message="",successmessage=""):
|
|||||||
first_name,last_name,emailaddress,encoder.decode_hex(id),
|
first_name,last_name,emailaddress,encoder.decode_hex(id),
|
||||||
ps=[r.p0,r.p1,r.p2,r.p3],
|
ps=[r.p0,r.p1,r.p2,r.p3],
|
||||||
ratio=r.cpratio,
|
ratio=r.cpratio,
|
||||||
quick_calc = quick_calc,
|
# quick_calc = quick_calc,
|
||||||
go_service=go_service,
|
# go_service=go_service,
|
||||||
emailbounced = r.emailbounced
|
emailbounced = r.emailbounced
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user