fixing pro trial issue
This commit is contained in:
@@ -26,6 +26,7 @@ from django.forms import formset_factory
|
||||
from rowers.utils import landingpages
|
||||
from rowers.metrics import axes, metricsgroups,rowingmetrics
|
||||
from rowers.metrics import axlabels
|
||||
from rowers.rower_rules import user_is_not_basic
|
||||
|
||||
formaxlabels = axlabels.copy()
|
||||
formaxlabels.pop('None')
|
||||
@@ -1451,7 +1452,7 @@ class FlexAxesForm(forms.Form):
|
||||
axchoicesbasicy.insert(0,('None',ax[1]+' (PRO)'))
|
||||
|
||||
|
||||
if rower.rowerplan == 'basic':
|
||||
if not user_is_not_basic(rower.user):
|
||||
self.fields['xaxis'].choices = axchoicesbasicx
|
||||
self.fields['yaxis1'].choices = axchoicesbasicy
|
||||
self.fields['yaxis2'].choices = axchoicesbasicy
|
||||
|
||||
@@ -3708,7 +3708,6 @@ def interactive_flex_chart2(id=0,promember=0,
|
||||
watermarkh = 35
|
||||
watermarkanchor = 'bottom_right'
|
||||
|
||||
|
||||
#rowdata,row = dataprep.getrowdata_db(id=id)
|
||||
columns = [xparam,yparam1,yparam2,
|
||||
'ftime','distance','fpace',
|
||||
@@ -3763,11 +3762,7 @@ def interactive_flex_chart2(id=0,promember=0,
|
||||
row = Workout.objects.get(id=id)
|
||||
if rowdata.empty:
|
||||
return "","No valid data",'','',workstrokesonly
|
||||
#else:
|
||||
# try:
|
||||
# rowdata.sort_values(by='time',ascending=True,inplace=True)
|
||||
# except KeyError:
|
||||
# pass
|
||||
|
||||
|
||||
workoutstateswork = [1,4,5,8,9,6,7]
|
||||
workoutstatesrest = [3]
|
||||
|
||||
@@ -3618,17 +3618,6 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
||||
# extrametrics = {m.replace('/','_slsh_'):m for m in additionalmetrics}
|
||||
extrametrics = additionalmetrics
|
||||
|
||||
# xparam = xparam.replace('/','_slsh_')
|
||||
# yparam1 = yparam1.replace('/','_slsh_')
|
||||
# yparam2 = yparam2.replace('/','_slsh_')
|
||||
|
||||
|
||||
# for metric in nometrics:
|
||||
# try:
|
||||
# extrametrics.pop(metric)
|
||||
# except KeyError:
|
||||
# pass
|
||||
|
||||
initial = {
|
||||
'xaxis':xparam,
|
||||
'yaxis1':yparam1,
|
||||
@@ -5739,7 +5728,6 @@ def workout_summary_edit_view(request,id,message="",successmessage=""
|
||||
messages.error(request,'Error updating Work per Stroke')
|
||||
elif powerorpace == 'spm':
|
||||
try:
|
||||
print('aap')
|
||||
rowdata.updateinterval_metric(
|
||||
' Cadence (stokes/min)',spm,mode='larger',
|
||||
debug=False,smoothwindow=2.,
|
||||
@@ -5869,7 +5857,6 @@ def workout_summary_edit_view(request,id,message="",successmessage=""
|
||||
activewindow=[activesecondsmin,activesecondsmax],
|
||||
)
|
||||
except:
|
||||
print('mies')
|
||||
messages.error(request,'Error updating SPM')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user