Private
Public Access
1
0

adding marker workouts

This commit is contained in:
Sander Roosendaal
2023-01-19 10:27:04 +01:00
parent 07617d0830
commit e7ccd4f2fa
2 changed files with 14 additions and 1 deletions

View File

@@ -1793,8 +1793,14 @@ def performance_chart(user, startdate=None, enddate=None, kfitness=42, kfatigue=
return ['', 'No Data', 0, 0, 0, outids]
df.set_index('date', inplace=True)
markerworkouts = workouts.filter(rankingpiece=True, workouttype__in=mytypes.rowtypes)
markerworkouts = Workout.objects.filter(
user=user.rower, date__gte=startdate-datetime.timedelta(days=90),
date__lte=enddate,
duplicate=False,
rankingpiece=True, workouttype__in=mytypes.rowtypes).order_by('date')
outids = [w.id for w in markerworkouts]
dates = [arrow.get(w.date).datetime for w in workouts]
testpower = [
w.goldmedalstandard if w.rankingpiece else np.nan for w in workouts]

View File

@@ -1285,6 +1285,13 @@ def performancemanager_view(request, userid=0, mode='rower',
showtests=True,
)
else:
markerworkouts = Workout.objects.filter(
user = therower, date__gte=startdate-datetime.timedelta(days=90),
date__lte=enddate,
duplicate=False,
rankingpiece=True, workouttype__in=mytypes.rowtypes).order_by('date')
ids = [w.id for w in markerworkouts]
form = PerformanceManagerForm(initial={
'doform': doform,
'dofatigue': dofatigue,