From ab64e0b763a16203404e96d2e2b3913bfa858677 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Mon, 20 May 2024 17:02:29 +0200 Subject: [PATCH] fixes --- rowers/dataprep.py | 8 ++++---- rowers/interactiveplots.py | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/rowers/dataprep.py b/rowers/dataprep.py index 0f4370a1..cc8f199f 100644 --- a/rowers/dataprep.py +++ b/rowers/dataprep.py @@ -1076,7 +1076,7 @@ def checkbreakthrough(w, r): r.user.email, r.user.first_name, r.user.last_name, - btvalues=btvalues.to_json()) + btvalues=btvalues.write_json()) for coach in r.get_coaches(): if coach.getemailnotifications and not coach.emailbounced: _ = myqueue(queuehigh, handle_sendemail_breakthrough, @@ -1084,7 +1084,7 @@ def checkbreakthrough(w, r): coach.user.email, r.user.first_name, r.user.last_name, - btvalues=btvalues.to_json(), + btvalues=btvalues.write_json(), surname=True) # submit email task to send email about breakthrough workout @@ -1098,7 +1098,7 @@ def checkbreakthrough(w, r): r.user.email, r.user.first_name, r.user.last_name, - btvalues=btvalues.to_json()) + btvalues=btvalues.write_json()) for coach in r.get_coaches(): if coach.getemailnotifications and not coach.emailbounced: _ = myqueue(queuehigh, handle_sendemail_hard, @@ -1106,7 +1106,7 @@ def checkbreakthrough(w, r): coach.user.email, r.user.first_name, r.user.last_name, - btvalues=btvalues.to_json(), + btvalues=btvalues.write_json(), surname=True) return isbreakthrough, ishard diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index c17d39ac..20989940 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -1815,7 +1815,6 @@ def interactive_flex_chart2(id, r, promember=0, workstrokesonly=workstrokesonly, for_chart=True) - if r.usersmooth > 1: # pragma: no cover for column in columns: try: @@ -1823,9 +1822,8 @@ def interactive_flex_chart2(id, r, promember=0, nrsteps = int(log2(r.usersmooth)) for i in range(nrsteps): rowdata = rowdata.with_columns( - (utils.ewmovingaverage( - rowdata[column], 5)).alias(column) - ) + column = utils.ewmovingaverage( + rowdata[column], 5)) except KeyError: pass