Private
Public Access
1
0

fixing hrftp

This commit is contained in:
Sander Roosendaal
2023-05-27 16:46:26 +02:00
parent 9365b03c9c
commit c8ba755b16
2 changed files with 15 additions and 2 deletions

View File

@@ -1621,7 +1621,20 @@ def get_existing_job(w):
def workout_trimp(w, reset=False):
r = w.user
if w.trimp > -1 and not reset:
if w.trimp <= 0 and w.averagehr > 0:
ftp = float(r.ftp)
_ = myqueue(
queuehigh,
handle_calctrimp,
w.id,
w.csvfilename,
ftp,
r.sex,
r.hrftp,
r.max,
r.rest)
return w.trimp, w.hrtss
elif w.trimp > -1 and not reset:
return w.trimp, w.hrtss
if get_existing_job(w):

View File

@@ -2105,7 +2105,7 @@ class SavedAnalysisView(UserPassesTestMixin, View):
self.searchform = SearchForm(initial={'q': query})
date_initial = {}
if startdate:
self.analyses = self.analyses.filter(date__gte=startdate)
self.analyses = self.analyses.filter(date__gte=startdate)
date_initial['startdate'] = startdate
if enddate:
self.analyses = self.analyses.filter(date__lte=enddate)