fixing obscure Mike bug
This commit is contained in:
@@ -819,6 +819,7 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
|||||||
oarlength=2.89, inboard=0.88,
|
oarlength=2.89, inboard=0.88,
|
||||||
forceunit='lbs',
|
forceunit='lbs',
|
||||||
consistencychecks=False):
|
consistencychecks=False):
|
||||||
|
|
||||||
message = None
|
message = None
|
||||||
powerperc = 100 * np.array([r.pw_ut2,
|
powerperc = 100 * np.array([r.pw_ut2,
|
||||||
r.pw_ut1,
|
r.pw_ut1,
|
||||||
@@ -844,7 +845,8 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
return new_workout_from_df(r, newdf,
|
return new_workout_from_df(r, newdf,
|
||||||
title=title,boattype=boattype)
|
title=title,boattype=boattype,
|
||||||
|
workouttype=workouttype)
|
||||||
try:
|
try:
|
||||||
checks = row.check_consistency()
|
checks = row.check_consistency()
|
||||||
allchecks = 1
|
allchecks = 1
|
||||||
@@ -989,6 +991,7 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
|||||||
message = "Warning: This workout probably already exists in the database"
|
message = "Warning: This workout probably already exists in the database"
|
||||||
privacy = 'hidden'
|
privacy = 'hidden'
|
||||||
|
|
||||||
|
|
||||||
w = Workout(user=r, name=title, date=workoutdate,
|
w = Workout(user=r, name=title, date=workoutdate,
|
||||||
workouttype=workouttype,
|
workouttype=workouttype,
|
||||||
boattype=boattype,
|
boattype=boattype,
|
||||||
@@ -1387,6 +1390,7 @@ def split_workout(r, parent, splitsecond, splitmode):
|
|||||||
def new_workout_from_df(r, df,
|
def new_workout_from_df(r, df,
|
||||||
title='New Workout',
|
title='New Workout',
|
||||||
boattype='1x',
|
boattype='1x',
|
||||||
|
workouttype='rower',
|
||||||
parent=None,
|
parent=None,
|
||||||
setprivate=False,
|
setprivate=False,
|
||||||
forceunit='lbs',
|
forceunit='lbs',
|
||||||
@@ -1413,7 +1417,6 @@ def new_workout_from_df(r, df,
|
|||||||
else:
|
else:
|
||||||
oarlength = 2.89
|
oarlength = 2.89
|
||||||
inboard = 0.88
|
inboard = 0.88
|
||||||
workouttype = 'rower'
|
|
||||||
notes = ''
|
notes = ''
|
||||||
summary = ''
|
summary = ''
|
||||||
makeprivate = False
|
makeprivate = False
|
||||||
|
|||||||
@@ -16300,8 +16300,6 @@ class MacroCycleDelete(DeleteView):
|
|||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@user_passes_test(hasplannedsessions,login_url="/", redirect_field_name=None)
|
@user_passes_test(hasplannedsessions,login_url="/", redirect_field_name=None)
|
||||||
def rower_trainingplan_view(request,
|
def rower_trainingplan_view(request,
|
||||||
id=0,
|
id=0,
|
||||||
@@ -16462,7 +16460,9 @@ def rower_trainingplan_view(request,
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if not thismicroid and not thismacroid and not thismesoid:
|
||||||
|
thismicro = get_todays_micro(plan,thedate=startdate)
|
||||||
|
thismicroid = thismicro.pk
|
||||||
|
|
||||||
|
|
||||||
return render(request,'trainingplan.html',
|
return render(request,'trainingplan.html',
|
||||||
|
|||||||
Reference in New Issue
Block a user