Private
Public Access
1
0

alerts, analysis, api tested

This commit is contained in:
2024-04-21 10:56:37 +02:00
parent 85bd89d3d2
commit 409f4aff63
8 changed files with 124 additions and 117 deletions

View File

@@ -1,6 +1,6 @@
from rowers.models import Alert, Condition, User, Rower, Workout
from rowers.teams import coach_getcoachees
from rowers.dataprep import getsmallrowdata_db, getrowdata_db
from rowers.dataprep import getrowdata_db, read_data, remove_nulls_pl
import datetime
import numpy as np
import math
@@ -101,8 +101,9 @@ def alert_get_stats(alert, nperiod=0): # pragma: no cover
ids = [w.id for w in workouts]
try:
df = getsmallrowdata_db(columns, ids=ids, doclean=True,
workstrokesonly=workstrokesonly)
df = read_data(columns, ids=ids, doclean=True,
workstrokesonly=workstrokesonly)
df = remove_nulls_pl(df)
except:
return {
'workouts': workouts.count(),