Private
Public Access
1
0

Merge branch 'release/v21.2.6'

This commit is contained in:
2024-05-26 13:52:16 +02:00
4 changed files with 16 additions and 5 deletions
+3 -2
View File
@@ -1721,9 +1721,10 @@ def interactive_flexchart_stacked(id, r, xparam='time',
if metricsdicts[column]['maysmooth']:
nrsteps = int(log2(r.usersmooth))
for i in range(nrsteps):
column_ew = utils.ewmovingaverage(
rowdata[column], 5)
rowdata = rowdata.with_columns(
utils.ewmovingaverage(
rowdata[column], 5).alias(column)
column = column_ew
)
except KeyError:
pass
+11 -2
View File
@@ -3697,13 +3697,22 @@ class Workout(models.Model):
def __str__(self):
try:
dates = self.date.strftime('%Y-%m-%d')
except AttributeError:
dates = ''
try:
durations = self.duration.strftime("%H:%M:%S")
except AttributeError:
durations = ''
elements = dict(
date = self.date.strftime('%Y-%m-%d'),
date = dates,
name = self.name,
distance = str(self.distance)+'m',
ownerfirst = self.user.user.first_name,
ownerlast = self.user.user.last_name,
duration = self.duration.strftime("%H:%M:%S"),
duration = durations,
boattype = self.boattype,
workouttype = self.workouttype,
seatnumber = 'seat '+str(self.seatnumber),
Binary file not shown.
+2 -1
View File
@@ -2229,7 +2229,8 @@ def history_view_data(request, userid=0):
df = df.with_columns(pl.col('time').diff().clip(lower_bound=0).alias("deltat"))
except KeyError: # pragma: no cover
pass
except ColumnNotFoundError:
pass
totalmeters, totalhours, totalminutes, totalseconds = get_totals(
g_workouts)