Private
Public Access
1
0

fixing obscure Mike bug

This commit is contained in:
Sander Roosendaal
2018-10-22 22:15:11 +02:00
parent a82c9343e0
commit 2613fc38b4
2 changed files with 8 additions and 5 deletions

View File

@@ -819,6 +819,7 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
oarlength=2.89, inboard=0.88,
forceunit='lbs',
consistencychecks=False):
message = None
powerperc = 100 * np.array([r.pw_ut2,
r.pw_ut1,
@@ -844,7 +845,8 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
except:
pass
return new_workout_from_df(r, newdf,
title=title,boattype=boattype)
title=title,boattype=boattype,
workouttype=workouttype)
try:
checks = row.check_consistency()
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"
privacy = 'hidden'
w = Workout(user=r, name=title, date=workoutdate,
workouttype=workouttype,
boattype=boattype,
@@ -1387,6 +1390,7 @@ def split_workout(r, parent, splitsecond, splitmode):
def new_workout_from_df(r, df,
title='New Workout',
boattype='1x',
workouttype='rower',
parent=None,
setprivate=False,
forceunit='lbs',
@@ -1413,7 +1417,6 @@ def new_workout_from_df(r, df,
else:
oarlength = 2.89
inboard = 0.88
workouttype = 'rower'
notes = ''
summary = ''
makeprivate = False

View File

@@ -16300,8 +16300,6 @@ class MacroCycleDelete(DeleteView):
return obj
@user_passes_test(hasplannedsessions,login_url="/", redirect_field_name=None)
def rower_trainingplan_view(request,
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',